Solving that pesky file rename in git with APFS Volumes

I’ve been using this setup for over 2 years now and it saved me from a large number of small to medium headaches that used to haunt me every so often. Because of this, I think it’s worth talking about in a blog post.

So what am I talking about? #

Ever had to commit a file only to realise that you got the capitalisation wrong? I’ve certainly been in that situation.

Well you’d think that you could just go back, edit the filename, git commit --commit and you’re good, right? Wrong.


Well… Wrong for most users at least, because most of them will notice that the naming change wasn’t picked up by git.

The reason why? It’s probably because you’re using a case-insensitive file system. It used to be the default option for HFS+, and it still is the default for APFS. Some applications rely on this to be the case, like the Adobe suite, so you don’t want to change case-sensitivity for your whole system drive.

Volumes to the rescue! #

APFS redefines partitions with the introduction of volumes. Normal partitions and APFS volumes differ in many ways, but the two that we care about in this case are:

So, in my case I created a new volume APFS called Projects with case-sensitive filenames and put all of my code and repositories in it.

Screenshot 2019-d06-10 at 15.53.17.png

Et Voilà! All filename changes are now getting picked up by git status.



Now read this

Reverse Hackintosh Pro

Well it’s been awhile, but I’m back to doing my own projects again. Prelude # So lately I’ve been feeling left out of the gaming world and thought to myself: “Hey why not build a sweet new gaming rig and jump right back into all of the... Continue →