Reputation: 15
I want to sync the same repositories between Linux/Mac/Windows so I need the Git internals (basically what's inside .git) be case insensitive compatible (so I don't want duplicate files there where only the case differs).
My main work machine is on Linux from where I want to sync these Git repositories to Mac/Windows.
I noticed that the directory .git/logs/refs/remotes/origin/ on Linux sometimes contains the same branch name with the original name (like TICKET-123-fix-this-thing) but also lowercased (ticket-123-fix-this-thing).
Is there a way to avoid this behavior (and possibly others I haven't yet noticed) so I can use this same repository on Mac and Windows? So basically, what I need to do to make the .git directory fully compatible (with regards to case) between Linux/Mac/Windows.
Thanks!
Upvotes: 0
Views: 106
Reputation: 489638
You cannot do this. The core.ignorecase
setting informs Git how your system works. It does not change how your system works. Overriding the setting simply mis-informs Git, which will subsequently misbehave (in predictable ways which are occasionally useful, but won't help you here).
What you can do, on a macOS system, is make yourself a case-sensitive file system. Here, your Git will behave the same way it does on a standard Linux file system. See my answer here.
You can, on a Linux system, make yourself a case-insensitive file system; see this ServerFault question.
Upvotes: 3