Tuesday, 25 November 2014

Git - find the global gitconfig file

From here

git config --global --edit should tell you the exact location no matter what kind of setup you have--just look at what file comes up in your editor.

"Windows" and "C:\Program Files\Git" means MSysGit, now "Git for Windows".
If you look at etc/profile (in C:\Program Files\Git):
HOME="$HOMEDRIVE$HOMEPATH"
Meaning:

C:\Users\MyLogin
(on Windows7)

For writing options: write to global ~/.gitconfig file rather than the repository .git/config.
That means the file is in C:\Users\MyLogin\.gitconfig for msysgit in Windows7.

1 comment:

  1. I was looking for exactly this confirmation. Thanks for valuable bit.

    Maven & Ivy

    ReplyDelete