Git is case-sensitive and your filesystem may not be - Weird folder merging on Windows - Scott Hanselman's Blog.
You can tell git to take account of the case by running
git config core.ignorecase false
You're probably using case insensitive (but case preserving) HFS+. I usually work round this like so:
$ git mv somename tmpname
$ git mv tmpname SomeName
This is happening because Mac OS X implements case preserving and case insensitivity features that are intended to help you.
Although the double rename suggestions in the other answer will work, I recommend the use of '--force' for a best practice result:
$ git mv --force somename SomeName
Note: if you try without the force option, git will barf on you like this:
$ git mv somename SomeName
$ fatal: destination exists, source=somename, destination=SomeName
In the above example, the git command fails and no files are changed in the filesystem or in git's index.
Try to change git config option core.ignorecase to false in your .gitconfig file.
The following steps helped me resolve the issue:
Rename the folder to temp
:
mv Folder temp // It will rename your Folder to temp
Stage and commit:
git add .
git commit -m "Temp"
Rename temp
folder to your choice:
mv temp folder // It will rename temp folder to the name of your choice(folder)
git add .
git commit -m "Folder Fixed"
Done - You can now push.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With