Avisi Blog

Change casing of filename in git

Geschreven door Gert-Jan van de Streek | 11 May 2012

If you want to just change the casing in a filename that is in a git repository, this can be problem on operating systems that have case insentive file systems, like Windows and Os X.

If you want to force the casing, this workaround can help you out:

  • rename yourfile > somethingcompletelydifferent
  • git commit your changes
  • rename somethingcompletelydifferent > YourFile
  • git commit your changes
  • git push

Fixed!