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.
source share