3

I tried to remove the values (to reset them) but they won't go away. Plus they contradict each other.

C:\Users\Chloe\workspace\app>git config --unset-all core.autocrlf

C:\Users\Chloe\workspace\app>git config --unset-all core.editor

C:\Users\Chloe\workspace\app>git config --unset-all core.edit

C:\Users\Chloe\workspace\app>git config -l | grep autocrlf
core.autocrlf=true
core.autocrlf=false

C:\Users\Chloe\workspace\app>git config -l | grep notepad
core.editor=/C/Program Files/Notepad++/notepad++.exe
core.edit=C:\\Program Files\\Notepad++\\notepad++.exe

I tried to edit the values with git config -e (but first I had to figure out how to specify the path correctly), and it didn't list either of those config keys.

git version 2.16.3.windows.1

Chloe
  • 25,162
  • 40
  • 190
  • 357
  • Possibly https://stackoverflow.com/questions/11868447/how-can-i-remove-an-entry-in-global-configuration-with-git-config/11868676#11868676 – larsks Dec 17 '18 at 01:45

2 Answers2

5

I found this answer http://stackoverflow.com/questions/2114111/ddg#2115116

And I used git config --list --show-origin then edited the files manually (from an elevated Notepad++). I had

file:"C:\\ProgramData/Git/config"       core.autocrlf=true
file:C:/Users/Chloe/.gitconfig  core.autocrlf=false
file:C:/Users/Chloe/.gitconfig  core.editor=/C/Program Files/Notepad++/notepad++.exe
file:C:/Users/Chloe/.gitconfig  core.edit=C:\\Program Files\\Notepad++\\notepad++.exe

Overall it was looking in 4 places: C:\ProgramData\Git\config, C:\Program Files\Git\mingw64\etc\gitconfig, C:/Users/Chloe/.gitconfig, .git/config.

Chloe
  • 25,162
  • 40
  • 190
  • 357
1

Run git config -l --show-origin to see where from the settings come. Most probably from the global ~/.gitconfig so remove them with

git config --global --unset-all core.autocrlf
phd
  • 82,685
  • 13
  • 120
  • 165