table of Contents
Query configuration information
Git configuration variables
Git comes with a git config tool to help set configuration variables that control the appearance and behavior of Git. Normally, these configurations are stored in the ~/.gitconfig file, which is only for the current user. You can pass --global
options to make Git read and write this file.
Query configuration information
You can use the git config --list command to list the current configuration of Git:
$ git config --list
Query a certain configuration
You can view a certain configuration of Git through git config <key>. For example, query the user name information currently configured in Git:
$ git config user.name
TCatTime