Case-insensitivity with OS X using git

Today, I got bitten by OS X being case-insensitive while using git. I had a directory models with JavaScript files in it named account.js, project.js, and event.js. I decided that the models should be capitalized. Sure, no problem using trusty mv.

When I looked in git though, no changed files. WTF? I even tried changing another file and committing. Looking in the web GitHub file browser, the files were still all lowercase.

rage.png

Turns out the solution is to use git mv -f.

➜  models git:(master) git mv -f account.js Account.js
➜  models git:(master) ✗ git mv -f project.js Project.js
➜  models git:(master) ✗ git mv -f event.js Event.js
➜  models git:(master) ✗ git status
    On branch master
    Changes to be committed:
      (use "git reset HEAD <file>..." to unstage)

          renamed:    account.js -> Account.js
          renamed:    project.js -> Project.js              
          renamed:    event.js -> Event.js

baby-win.jpeg

 
6
Kudos
 
6
Kudos

Now read this

Open letter to SF Mayor Ed Lee and Greg Suhr (police chief)

I am writing today, to voice my concern and outrage over the increasing homeless and drug problem that the city is faced with. I’ve been living in SF for over three years, and without a doubt it is the worst it has ever been. Every day,... Continue →