The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

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:

git config commands
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 -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/configreferences)

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)

Documentation: [Wayback/Archive] Git – git-config Documentation

Query: [Wayback/Archive] git config show all values – Sök på Google

--jeroen

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.