RAX
RAX

Reputation: 211

Does git really require a case sensitive filesystem?

I'm trying to learn Android and was following instructions in building.

I noticed from Android doc that "In a default installation, Mac OS runs on a case-preserving but case-insensitive filesystem. This type of filesystem is not supported by git and will cause some git commands (such as "git status") to behave abnormally."

I'm wondering that once you install Xcode and developer tools, git is there already too. So does that suffer from any issue with git since by default, Mac FS is case insensitive?

Upvotes: 3

Views: 162

Answers (1)

maja
maja

Reputation: 18054

No, git does not require a case sensitive Filesystem.

I'm using Windows (ntfs is case insensitive) and have no problems using git. However, you must not have multiple files with identical names, that only differ in their letter casing. If they do, you can propably lose data as git treats them as one file.

Note, that the file .git/config also has a setting called ignorecase, which defaults to false. You might want to set that flag to true, because if you change the letter casing of an already-existing file, git otherwise might not recognise the change.

However, only change this flag with the first commit - avoid changing it in the middle of development. I 'm currently working on such a project, and we have dozens of issues because git doesn't seem to be able to deal with that.

In some other projects, setting the flag to true during development worked well though, but the possibility of screwing up your repo still exists.

Upvotes: 2

Related Questions