Changing filename case in Git


I have a file named ‘filter.php’ and I renamed it to ‘Filter.php’, but Git doesn’t notice this. Instead I needed to do something like this:

git mv filter.php filter.php2
git mv filter.php2 Filter.php

It looks stupid, but it works like a charm!

, , ,

  1. #1 by Per on September 7, 2011 - 21:42

    This most likely has to do with Mac OS X’s (default) case insensitive filesystem setting.

  2. #2 by Erik Bauffman on September 8, 2011 - 07:01

    Au contraire mon ami! I’ve read that git is not case sensitive when it comes to filenames. Ah well, potaaaato potato :)

  3. #3 by Per on September 8, 2011 - 09:00

    I actually don’t know if it is, but when testing on a linux box, git *does* detect the uppercasing.

  4. #4 by Erik Bauffman on October 3, 2011 - 07:39

    @per you’re right. It was osx being a bitch ;)

(will not be published)