I am trying to rename files from foobar.php to FooBar.php which is quite a challenge in Git. So far I have found out that I had to set up the git config value of ignorecas
Clone/checkout into a case-sensitive file system (on Mac OS X you can just make a case-sensitive disk image to do so), and then git rm the file with the capitalization you don't want.
As to why ignorecase was set to true, the documentation says:
core.ignorecase
The default is false, exceptgit-clone(1)orgit-init(1)will probe and setcore.ignorecasetrue if appropriate when the repository is created.
Since your Mac probably has a case-insensitive filesystem (it's the default), git will have noticed that and set the flag appropriately.