5

How can I find/list the global and the users config files? I mean "Git-native functionality", not Linux commandos like find.

ΩmegaMan
  • 26,526
  • 10
  • 91
  • 107
automatix
  • 12,706
  • 23
  • 96
  • 213

1 Answers1

6

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.

Community
  • 1
  • 1
Patrick B.
  • 11,133
  • 8
  • 54
  • 96