Storage location for global .gitconfig

Where is the global .gitconfig stored for each OS?

Linux: ~/.gitconfig

Mac: ~/.gitconfig

Windows: ????

2 answers

1 accepted

This widget could not be displayed.
Jeff Thomas Atlassian Team Nov 20, 2013

Windows will store it in $HOMEDRIVE$HOMEPATH\.gitconfig

Which, depending on how things are mapped will likely be your %USERPROFILE%, or C:\Users\MyLogin\.gitconfig on Windows 7.

You can check where Git has it located by using the command below, it will open up the file in your default editor.

git config --global --edit

Thanks. Just for completeness: The command-line is the button named `Terminal`. In the windows console its %homedrive%%homepath%.

When executing that I get the following error "error: cannot spawn gitpad: no such file or directory. error: unable to start editor 'gitpad'

Turns out I needed to update the global core.editor (http://stackoverflow.com/a/773973/1366033) using `git config core.editor notepad`

This widget could not be displayed.
Jeff Thomas Atlassian Team Nov 19, 2013

Windows will store it in %USERPROFILE%\.gitignore

You can check where Git is set to look for the global ignore file with:

git config --get core.excludesfile

You can also set the global ignore with:

git config --global core.excludesfile "%USERPROFILE%\.gitignore"

I don't mean .gitignore but .gitconfig where things like core.autocrlf and similar are stored.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Monday in Teamwork

The tools we make for teams? We use them every day at Atlassian to get shit done (and it works).

I’m Jess, a Product Marketer for Jira Software Server and Data Center, and now a huge fan of our products. Read on for a 90 day, new-hire perspective on what it’s like to standardize on the Atlassian...

39 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you