When trying
git mv dir1/File.py dir2
I get
fatal: not under version control, source=dir1/File.py, destination=dir2/File.py
To debug I run
git ls-files | grep File.py
Luckily I had alias grep="grep -i"
and the problem is clear. file.py
is under version control. File.py
isn't.
I'm guessing that I have once renamed file.py
to File.py
from the shell (on OS X this usually requires going through a third name). Git continued to treat the two files as the same, because OS X treats them as one. But git refuses to move a file unless the case also matches.
How do I systematically determine whether there are similar case sensitivity problems lurking within a git repo?
I'm using the default formatting of OS X extended (Journaled)
, which is not case-sensitive, and I'd like to keep it that way.
Update
I just noticed this relevant post.