Git query configuration information

table of Contents

Git configuration variables

Query configuration information

Query a certain configuration


 

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 --globaloptions 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

 

Guess you like

Origin blog.csdn.net/TCatTime/article/details/108744256