I change the capitalization of a directory and Git doesn't seem to pick up on it

You can tell git to take account of the case by running

git config core.ignorecase false


You're probably using case insensitive (but case preserving) HFS+. I usually work round this like so:

$ git mv somename tmpname
$ git mv tmpname SomeName

How to git mv on Mac Case-Sensitively

This is happening because Mac OS X implements case preserving and case insensitivity features that are intended to help you.

Although the double rename suggestions in the other answer will work, I recommend the use of '--force' for a best practice result:

$ git mv --force somename SomeName


Note: if you try without the force option, git will barf on you like this:

$ git mv somename SomeName
$ fatal: destination exists, source=somename, destination=SomeName

In the above example, the git command fails and no files are changed in the filesystem or in git's index.

Tags:

Macos

Git