How do I commit case-sensitive only filename changes in Git?

Gil Shulman picture Gil Shulman · Jul 16, 2013 · Viewed 334.4k times · Source

I have changed a few files name by de-capitalize the first letter, as in Name.jpg to name.jpg. Git does not recognize this changes and I had to delete the files and upload them again. Is there a way that Git can be case-sensitive when checking for changes in file names? I have not made any changes to the file itself.

Answer

Keith Smiley picture Keith Smiley · Jan 3, 2014

You can use git mv:

git mv -f OldFileNameCase newfilenamecase