Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does git really require a case sensitive filesystem?

Tags:

git

android

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?

like image 473
RAX Avatar asked May 19 '26 18:05

RAX


1 Answers

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.

like image 186
maja Avatar answered May 22 '26 09:05

maja



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!