5

I have git 2.6.2 installed in Windows 7.

I have core.autocrlf set to False. I'd like to know where that setting comes from. I have the following weird behavior:

> cd c:\
> git config --global --list | select-string autocrlf
> git config --system --list | select-string autocrlf
fatal: unable to read config file 'C:\Program Files\Git\mingw64/etc/gitconfig': No such file or directory
> git config --list | select-string autocrlf

core.autocrlf=false
core.autocrlf=False


> git config core.autocrlf
False

So I have not set core.autocrlf in the global config. I have no system config. I am currently not in a git directory. Still, I get no less than two core.autocrlf settings. Are they generated by the Git binary? (if so, why two settings?)

Klas Mellbourn
  • 42,571
  • 24
  • 140
  • 158
  • 1
    What is about `%HOME%\.config\git\config` ? – kan Oct 22 '15 at 15:51
  • @kan interesting lead, I did have a `$env:HOME\.config` folder that I hadn't noticed, but I cannot find any git folder in it, or anything else remotely related to git. – Klas Mellbourn Oct 22 '15 at 20:10
  • I don't know then... Simpler just to pick `Process Monitor` and find accessed files. – kan Oct 22 '15 at 21:14
  • My friend had the exact same issue and I was searching frantically to allow him to checkout my repository. He kept checking out shell scripts with `\r\n` so they wouldn't run. Thanks for asking! – PatPeter Dec 30 '19 at 05:58

1 Answers1

5

Look in C:\ProgramData\Git\config.

And see this question for more details (it's not just core.autocrlf that has a "phantom" value, there's more :) )

Community
  • 1
  • 1
andrei.serea
  • 950
  • 1
  • 9
  • 15