Gitconfig: location of git configuration files

How can I find / list global and user configuration files? I mean "Git Native Functionality", not the Linux commando like find .

thanks

+4
source share
1 answer

In this question, a comment pointed out how to find out which file is associated with --system , --global and --local .

In short, you just use --edit for git config :

 git config --system --edit git config --global --edit git config --local --edit 

If you replace the EDITOR environment EDITOR , for example. echo you can get it in a variable, i.e. you can use it programmatically:

 t=`EDITOR=echo git config --system --edit` echo $t 

prints /etc/gitconfig in my case.

+3
source

All Articles