The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Storage location for global .gitconfig

RedX2501
November 19, 2013

Where is the global .gitconfig stored for each OS?

Linux: ~/.gitconfig

Mac: ~/.gitconfig

Windows: ????

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

4 votes
Answer accepted
Jeff Thomas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 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

RedX2501
November 20, 2013

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

Kyle Mitofsky
Contributor
October 21, 2015

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

Kyle Mitofsky
Contributor
October 21, 2015

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

0 votes
Jeff Thomas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 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"
RedX2501
November 20, 2013

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

TAGS
AUG Leaders

Atlassian Community Events