How to make git ignore changes in case?

Since version 1.5.6 there is an ignorecase option available in the [core] section of .git/config

e.g. add ignorecase = true

To change it for just one repo, from that folder run:

git config core.ignorecase true

To change it globally:

git config --global core.ignorecase true

In git version 1.6.1.9 for windows I found that "ignorecase=true' in config was already set by default.


You can force git to rename the file in a case-only way with this command:

git mv --cached name.txt NAME.TXT

Note this doesn't change the case of the file in your checked out copy on a Windows partition, but git records the casing change and you can commit that change. Future checkouts will use the new casing.

Tags:

Windows

Git