8

If you set something like this on Windows:

git config --global core.autocrlf false

Where is this global setting getting written to?

S. Michaels
  • 961
  • 4
  • 10
  • 12

2 Answers2

9

It will write the values in a file called .gitconfig, unless you specify another name with the '--file' option

 git config --global --file myFile key value

Note: the environment variable GIT_CONFIG can also be used to specify another name for this file. --file will supersede GIT_CONFIG value.

Whatever its name, it will write it in:

  • $HOME for Unix
  • %HOMEPATH% for Windows (c:\Users\MyName by default)

If $HOME or %HOMEPATH% is not properly set, the git config command will fail.

It is used to store a per-user configuration and serves as fallback values for the repository-local '.git/config' file.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 9
    Also with new enough Git you can use "`git config --global --edit`" to open per-user config file in your editor... and from there I would guess you would be able to find where it is. – Jakub Narębski Sep 26 '09 at 16:50
3

You can check your $HOME directory for a file like .gitconfig

Vincent
  • 4,883
  • 2
  • 25
  • 17