Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Storage location for global .gitconfig

Where is the global .gitconfig stored for each OS?

Linux: ~/.gitconfig

Mac: ~/.gitconfig

Windows: ????

2 answers

1 accepted

4 votes
Answer accepted
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`

0 votes
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
TAGS
Community showcase
Published in DevOps

GitHub Script with GitHub Actions Automating Workflows

Hello folks, This is a series of articles where I explain GitHub Script with GitHub Actions and how you can automate publishing data on Atlassian & GitHub Platform based on the results of Workf...

90 views 1 2
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you