Reputation: 2035
I have a repo that need to be run both in windows and linux, so need to set git config core.ignorecase false
but instead of asking each developer to set this in their repo, I want to add this in .gitattributes
I tried two things and both didn't work
[core]
ignorecase = false
and
* text=auto ignorecase=false
I checked the .git/config
file and content is like this:
if I set it to false
, I can see that vscode is picking files names changes. but when I set that in .gitattributes
vscode doesn't pick the changes.
how should I set it only for this repository so all developers don't need to set it manually?
Upvotes: 4
Views: 2779
Reputation: 78873
No, do not do this. You cannot configure git to be case insensitive, despite what this setting's name suggests.
`core.ignorecase is not a configuration option; git detects whether your repository is on a case sensitive filesystem or not at initialization time. It saves this state in the configuration so that it doesn't have to needlessly requery over and over again, every time you run git.
Do not change core.ignoreCase
. There is no way to change the fact that an ext3 filesystem is case sensitive and that HFS+ and NTFS are case insensitive by default. No setting to git can change this fact, and setting core.ignoreCase
to the wrong value will break more things than you're trying to fix.
Upvotes: 2