rafaelmaeuer
5/18/2018 - 3:20 PM

Git remove same file with different capitalization

OS X's filesystem is, by default, case-insensitive. So if you have two files in a Git repository with the same name but different cases you get the problem you're having now.

A simple work around is to use Disk Utility to create a case-sensitive disk image, clone the repo onto that, fix the problem there, and push the fix.

To make the disk image...

  • Open Disk Utility.
  • Do File -> New Image -> Blank Image.
  • Set the Format to be OS X Extended (Case-sensitive, Journaled).

It will automatically be mounted and waiting for you in /Volumes. After you clone you should see both files and can do with them as you please.