I know git-config
doesn't know all possible default values, but is there any way to see not only which config values apply to the current repo but also which config (local, global, system) is responsible?
Asked
Active
Viewed 6,132 times
20

Tobias Kienzler
- 25,759
- 22
- 127
- 221
1 Answers
40
Sure, just
git config --list --show-origin

Tobias Kienzler
- 25,759
- 22
- 127
- 221
-
2only as of git 2.8 – cori Mar 23 '18 at 03:58
-
This won't include values set from supported environment variables, like `EMAIL` (for `user.email`). – void.pointer Mar 17 '21 at 17:07
-
@void.pointer Good point, though not too surprising since that could be overridden per command anyway... The dupe-question https://stackoverflow.com/q/17756753/321973 also doesn't mention this I think... Did you find a solution for this? – Tobias Kienzler Mar 18 '21 at 07:13
-
2This doesn't show the full picture (i.e. it doesn't include defaults/unset values), doesn't show the effective configuration in its entirety. – tmillr Apr 23 '23 at 23:27