A case-only rename is invisible to git status
You rename a file's capitalisation, git status says there is nothing to commit, and it is right about the tree it is looking at. The repository keeps the old name, the next case-sensitive machine disagrees with your working copy, and every local check you can think of confirms whatever you already believe.
The symptom
$ git init -q . && echo 'hello' > README.md && git add README.md && git commit -qm init
$ mv README.md Readme.md
$ ls
Readme.md
$ git status --porcelain
$
The file on disk is called Readme.md. git status reports nothing: clean tree, nothing to commit. There is nothing to push, so nothing is pushed, and the repository still contains the old spelling:
$ git ls-files
README.md
ls and git ls-files are now describing the same file by different names, and git status — whose entire job is to report the difference between those two views — says there is no difference.
Both names "exist"
The check you would reach for to confirm the rename worked agrees with you whichever way you ask it:
$ test -f README.md && echo "test -f README.md -> YES" || echo "test -f README.md -> no"
test -f README.md -> YES
README.md is not in the directory listing. test -f says it is there. The filesystem is case-insensitive, so it resolves the old name to the new file, and every tool that goes through the filesystem inherits that answer: test, cat, [ -f ], a build script's existence check, an import statement.
The local environment cannot see the bug, and it is the environment the bug is created in. Nothing you can run on the machine where you made the rename will disagree with you. The first thing that notices is a case-sensitive filesystem somewhere else, by which point the commit is already history.
Why — and the setting that causes it
$ git config core.ignorecase
true
core.ignorecase is set to true by git init on a case-insensitive filesystem, which is correct and not something to go changing casually. With it set, git does not treat a difference in case as a difference in path, so the index entry README.md and the working file Readme.md are considered the same entry, and there is nothing to report.
The control: git status is not simply broken
Two things that *are* changes, in the same repository, immediately after the above:
$ echo 'changed' >> Readme.md
$ git status --porcelain
M README.md
$ git checkout -- .
$ git status --porcelain
(empty)
$ mv README.md OTHER.md
$ git status --porcelain
D README.md
?? OTHER.md
$ mv OTHER.md README.md
$ git status --porcelain
(empty)
The undo steps are shown because they matter: the tree returns to clean after each control, so the clean tree in the first section is the same clean tree, not a different broken state.
A content change is detected. A rename that changes more than case is detected — reported as a delete plus an untracked file, which is the normal way git shows an unstaged rename. So git status is working, the repository is healthy, and the silence in the first section is specific to the case-only rename rather than a broken checkout.
Note the first one: the modification is reported against README.md, the name git knows, not Readme.md, the name on disk. Even when git does speak up, it speaks the old name.
The fix
git mv --force
$ git mv --force README.md Readme.md
$ git status --porcelain
R README.md -> Readme.md
$ git ls-files
Readme.md
R — a staged rename, ready to commit, and git ls-files now reports the new spelling. git mv operates on the index rather than only the filesystem, so it can record a change the filesystem cannot represent as a change. --force is required because, as far as the case-insensitive filesystem is concerned, the destination already exists.
This is the whole fix. It is one command, and it works whether or not you already did the mv.
What not to do
Setting core.ignorecase=false makes git see the difference, and it is the wrong answer on a case-insensitive filesystem. Git would then believe README.md and Readme.md are two separate paths that can both exist, while the filesystem can only hold one of them — which produces phantom deletions, a file that reappears after you remove it, and checkouts that cannot be made clean. The setting is a description of the filesystem, not a preference. Leave it alone and use git mv.
Checking a repository you inherited
To find paths that would collide on a case-sensitive filesystem, ask git for its own list rather than the directory:
$ git ls-files
Readme.md
git ls-files reads the index, so it is immune to the filesystem's opinion about case. Comparing it to what ls -R reports is the comparison that actually detects this; comparing test -f against your expectations detects nothing.
Why this one is worth a page
- The tool whose job is to report differences reports none.
git status
is the single command you would use to check, and it is the one that cannot see it.
- Every alternative local check also passes.
test -fresolves both
spellings, so there is no second opinion available on that machine.
- The silence is indistinguishable from success. An empty
git status --porcelain is what a finished, committed, clean state looks like.
- It is discovered somewhere else, later, by someone else. The commit
that should have contained the rename simply does not exist, so there is no bad change to find — only a missing one.
The general form: a tool that compares two views can only report differences both views are capable of expressing. The filesystem cannot express this one, so git, asked to compare against the filesystem, cannot either. The index can, which is why the fix is a command that writes to the index.
Measured on
Windows 11 (NTFS, case-insensitive by default), Git Bash MSYSTEM=MINGW64, git as shipped with Git for Windows, 2026-11-28. Every block is from one throwaway repository created by git init in a scratch directory for this page, with a local user.name and user.email set to placeholder values so nothing was committed under a real identity; it was deleted afterwards. core.ignorecase was read back from that repository rather than assumed. The behaviour on a case-sensitive filesystem is not measured here — no such filesystem was available on this machine — so the claim made above is only that the local checks cannot detect the problem, not a measurement of what the remote machine then does with it.