Update 2016: with git 2.8 (March 2016), you can simply use:
git config --list --show-origin
And with Git 2.26 (Q1 2020), you can add a
git config --list --show-origin --show-scope
You will see which config is set where.
See "Where do the settings in my Git configuration come from?"
it will work with non-standard install locations. (i.e. Git Portable)
(like the latest
PortableGit-2.14.2-64-bit.7z.exe, which can be uncompressed anywhere you want)
Original answer (2010)
From the docs:
For writing options: write to global
~/.gitconfigfile rather than the repository
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:
(on Windows 7)
That means the file is in
C:\Users\MyLogin\.gitconfig for Git in Windows 7.