Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Update 2016: with git 2.8 (March 2016), you can simply use:</p> <pre><code>git config --list --show-origin </code></pre> <p>You will see which config is set where.<br> See "<a href="https://stackoverflow.com/a/35670933/6309">Where do the settings in my Git configuration come from?</a>"</p> <p>As <a href="https://stackoverflow.com/users/3357935/steven-vascellaro">Steven Vascellaro</a> points out <a href="https://stackoverflow.com/questions/2114111/where-does-git-config-global-get-written-to/2115116#comment79861204_2115116">in the comments</a>, </p> <blockquote> <p>it will work with non-standard install locations. (i.e. <a href="https://github.com/git-for-windows/git/releases" rel="noreferrer">Git Portable</a>)</p> </blockquote> <p>(like the latest <a href="https://github.com/git-for-windows/git/releases/download/v2.14.2.windows.1/PortableGit-2.14.2-64-bit.7z.exe" rel="noreferrer"><code>PortableGit-2.14.2-64-bit.7z.exe</code></a>, which can be uncompressed anywhere you want)</p> <hr> <p>Original answer (2010)</p> <p>From <a href="http://git-scm.com/docs/git-config" rel="noreferrer">the docs</a>:</p> <blockquote> <h3>--global</h3> <p>For writing options: write to global <code>~/.gitconfig</code> file rather than the repository <code>.git/config</code>.</p> </blockquote> <p>Since you're using <a href="http://msysgit.github.io/" rel="noreferrer">Git for Windows</a>, it may not be clear what location this corresponds to. But if you look at etc/profile (in <code>C:\Program Files\Git</code>), you'll see:</p> <pre><code>HOME="$HOMEDRIVE$HOMEPATH" </code></pre> <p>Meaning: </p> <pre><code>C:\Users\MyLogin </code></pre> <p>(on Windows 7)</p> <p>That means the file is in <strong><code>C:\Users\MyLogin\.gitconfig</code></strong> for Git in Windows 7.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload