You can try:
"git mv -f foo.txt Foo.txt" (note: this is no longer required with git 2.0.1 )- set
ignorecase to false in the configuration file.
But the case problem (for example, for Windows) is described in msysgit issue 228 (again: it should now - June 2014 - work with git 2.0.1 )
It is always possible to set ignorecase to false in the configuration file, which will force Unix to be used as git semantics over NTFS.
git supports this behavior, but not by default - from the point of view of NTFS, a.txt and a.txt are one and the same - therefore git tries to keep this as most users would expect
As the best workaround you can
git mv foo.txt foo.txt.tmp && git mv foo.txt.tmp Foo.txt
which also changes the case of the file stored on disk.
This blog post illustrates the same issue on macOS during rebase:
By default, they are not case sensitive on Mac OS X file systems. FFFFFF.gif same as FFFFFF.gif .
If you delete the file in question simply from the file system and not from the git index, of course, you can merge the branch in question and restore it as if nothing had happened.
The steps are pretty simple:
$ rm file/in/question.gif $ git merge trunk
Anyway, remember what git mv means :
mv oldname newname git add newname git rm oldname
therefore, if newname and oldname collide, you need to make them different (even if it is only for a short period of time), therefore git mv foo.txt foo.txt.tmp && git mv foo.txt.tmp Foo.txt
VonC Oct 13 '10 at 6:09 2010-10-13 06:09
source share