Reputation: 14512
How can I find/list the global and the users config files? I mean "Git-native functionality", not Linux commandos like find
.
Upvotes: 6
Views: 3440
Reputation: 12333
In this question a comment indicated how to know which file is related to --system
, --global
and --local
.
In short you just use --edit
to git config
:
git config --system --edit
git config --global --edit
git config --local --edit
If you replace the environment-variable EDITOR
with e.g. echo
you can receive it in a variable, ie. you can use it programmatically:
t=`EDITOR=echo git config --system --edit`
echo $t
prints /etc/gitconfig
in my case.
Upvotes: 10