git config: list all variables and their default values

Edit Jan 23, 2022

  • git config --system -l for system-wide variables (retrieved from installation folder; references)

  • git config --global -l for global variables (retrieved from ~/.gitconfig or $XDG_CONFIG_HOME/git/config if the first doesn’t exists; references)

  • git config --local -l or git config -l for 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 --local shows a different result than git config -l, the latter (apparently) showing all the three command outputs merged (tested on Windows)


Old answer

git config --global -l for global variables or git config -l for local repository variables

P.S.: I know have passed 2 years since you posted the question, but I was looking for the same thing and I read this post so I guessed users like me would have wanted a solution to their problem and I posted a reply, even if you probabily have solved your problem long time ago.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)