How to make Git case sensitive?

Asked

Viewed 52 times

2

My operating system is not case sensitive by default, which means that there is no difference between capitalizing the letters of a filename, for example.

This behavior constantly gets in my way when I’m in a local Git repository, especially when I want to change a file name and only change the box with a few letters of the file name. Git doesn’t even recognize the change.

The question is, is there a way to change this Git behavior, making it case sensitive (box-sensitive)?

If so, I’d like to know how I can do it to global level (to any repository on my computer) and level of a specific project (repository), so that other people who eventually go to work on this project also have this kind of preconfiguration.

1 answer

2


Exists the configuration core.ignorecase

You can use it as follows:

git config --global core.ignorecase [false|true]

It is possible to check more on documentation

Browser other questions tagged

You are not signed in. Login or sign up in order to post.