git config: list all variables and their default values – Stack Overflow
Posted by jpluimers on 2025/04/15
Empirically, these are show the same behaviour where “command 2″and “command 3″are documented, but still present a lot as the only solution in blog posts and help sites:
command 1: list |
command 2: --list |
command 3: -l |
what config is shown |
|---|---|---|---|
git config list --local |
git config --list --local |
git config -l --local |
--local config for current repository |
git config list --global |
git config --list --global |
git config -l --global |
--global config for the current user |
git config list --system |
git config --list --system |
git config -l --system |
--system config for all users |
git config list |
git config --list |
git config -l |
all 3 levels of config combined, for convenience without telling which configuration setting is on which level |
Based on [Wayback/Archive] git config: list all variables and their default values – Stack Overflow (thanks [Wayback/Archive] Matteo Meil):
Edit Jan 23, 2022
git config --system -lfor system-wide variables (retrieved from installation folder; references)git config --global -lfor global variables (retrieved from~/.gitconfigor$XDG_CONFIG_HOME/git/configif the first doesn’t exists; references)git config --local -lorgit config -lfor repository variables (retrieved from.git/config; references)Also note that although on docs it says
--local[…] This is the default behavior.issuing
git config -l --localshows a different result thangit config -l, the latter (apparently) showing all the three command outputs merged (tested on Windows)
Documentation: [Wayback/Archive] Git – git-config Documentation
Query: [Wayback/Archive] git config show all values – Sök på Google
--jeroen






Leave a comment