1

I'm trying to set the autocrlf property to false. For some reason I currently having 3 such entries and I'm assuming one of them overwrites the others. Running git config -l returns a list with 3 autocrlf entries, one of them true, 2 of them false enter image description here

Running git config --global -l returns a list with one autocrlf entry set to false enter image description here

Running git config --local-l returns a list with one autocrlf entry set to false enter image description here

Running git config --system -l returns an error enter image description here

Somewhere there is a file maybe that contains the true setting. How can I find this file? Could the error I'm getting for the system config have something to do with it?

Thanks in advance.

Lori
  • 562
  • 5
  • 24

2 Answers2

5

With git version 2.8 onwards, you can simply use:

git config --list --show-origin

You will see which config is set where.

Also, see "Where do the settings in my Git configuration come from?"

It is also possible that the third entry lives in c:\Users\All Users\git\config but the output of the above command should remove the guesswork.

Community
  • 1
  • 1
Ashutosh Jindal
  • 18,501
  • 4
  • 62
  • 91
  • 2
    Thanks a lot. With the new version i managed to find out that the problematic file was located in c:\ProgramData\Git\config. – Lori Sep 29 '16 at 06:37
  • Great. Which file was the third entry coming from? – Ashutosh Jindal Sep 29 '16 at 06:39
  • Posted a new asnwer to explain the source of the problem and a solution. I will select your answer as the correct one because thats the right way to get to the core of the problem. Thanks again. Saved me a lot of headaches:) – Lori Sep 29 '16 at 06:42
1

Turns out the the problematic property was set by the windows installer. Specifically this page: enter image description here

When selecting the first option the autoclrf is set to true in you c:\ProgramData\Git\config file. Don't know how you can change this using a console command, like git config --"which_one?" core.autocrlf false. As a workaround simply edit the file.

Community
  • 1
  • 1
Lori
  • 562
  • 5
  • 24