tags:

views:

2881

answers:

5

I'm not too sure what is going on here, but sometimes a particular file in my repository will change the case of it's name. e.g.,:

before: File.h

after: file.h

I don't really care why this is happening, but this causes git to think it is a new file, and then I have to go and change the file name back. Can you just make git ignore case changes?

[edit] I suspect it is Visual Studio doing something weird with that particular file, because it seems to happen most often when I open and save it after changes. I don't have any way to fix bugs in VS however, but git should be a bit more capable I hope.

+1  A: 

Since git is a heavily unix-centric project, the inablity to ignore case was certainly an intentional decision. Case-sensitivity is a very strong convention for all unix and linux systems.

Edit: My bad, apparently you can make it case insensitive. I spoke too soon.

Christian Oudard
A: 

@Gorgapor: I suspect that is the case, however git needs to "play nice" in the Windows world too, just as other apps need to "play nice" in Unix environments.

1800 INFORMATION
+9  A: 

Since version 1.5.6 there is an ignorecase option available in the [core] section of .git/config

e.g. add "ignorecase = true" entry

MarkB
git config core.ignorecase trueorgit config --global core.ignorecase trueto apply globally.
aaronjensen
@graywh: It's documented in git-config under core.ignorecase (http://www.kernel.org/pub/software/scm/git/docs/git-config.html)
Ben Lings
A: 

As an aside, programmes should not change the case of programmes. What's the capitalisation of "i"? The english speaker says "I", the turkish speaker says "İ". What if you change a file from "file.txt" to "FILE.TXT"? Is it the same name?

Rory
A: 

In git version 1.6.1.9 for windows I found that "ignorecase=true' in config was already set by default.

John C
haha maybe that's a windows thing
phunehehe