Using the git config --global command to set things up, where is the file?
eg :
git config --global core.editor "blah"
C:\Program Files\Git\etc\gitconfig
C:\myapp\.git\config
From the docs:
--global
For writing options: write to global
~/.gitconfig
file rather than the repository.git/config
.
Since you're using Git for Windows, it may not be clear what location this corresponds to. But if you look at etc/profile (in C:\Program Files\Git
), you'll see:
HOME="$HOMEDRIVE$HOMEPATH"
Meaning:
C:\Users\MyLogin
(on Windows 7)
That means the file is in C:\Users\MyLogin\.gitconfig
for Git in Windows 7.
Note: with git 2.8 (March 2016), you can simply use:
git config --list --show-origin
You will see which config is set where.
See "Where do the settings in my Git configuration come from?"