This guide discusses the different commands to show global Git configurations.
How do I Show my Global Git Configuration?
Multiple commands are available to show the global Git configurations, such as:
- The “$ git config –global –list” command is used to display the list of configurations.
- To view the user name, the “$ git config –global –get user.name” command can be utilized.
- The “$ git config –global –get user.email” command is used to view the user email.
- The “$ git config –global credential.helper” command is used to show the credentials.
- The “$ git config –global gui.recentrepo” command can be utilized to view the recent repository.
Now, let’s utilize the stated commands!
Step 1: Launch Git Terminal
First, search and launch the Git terminal on your system using the Startup menu:
Step 2: List Global Git Configuration
Execute the “git config –global” command with the “–list” option to view the list of global Git configurations:
As you can see, the below output displayed the whole list of my global Git configuration:
How to Show my Global Git Configuration User Email?
To show the global Git configuration user email, execute the “git config –global –get” command and specify “user.email” as the property value you want to get:
It can be observed that we have successfully fetched the configured email id:
How to Show my Global Git Configuration User Name?
To display the global Git configuration user name, the “git config –global –get” command with the “user.name” can be utilized:
As you can see, the global Git configured user name is displayed:
How to Show my Global Git Configuration Credential?
To show the global Git configuration credential, use the “git config” command with the “credential.helper”:
How to Show my Global Git Configuration Recent Repository?
To show the global Git configuration recent repository, the “git config” command can be used along with the “gui.recentrepo” option:
According to the below output, “Linuxhint” is our recent repository:
That’s it! We have compiled the different commands to show global Git configurations.
Conclusion
Several commands are available to show the global Git configurations, such as the “$ git config –global –list” command that can display the list of configurations. To display the user name and user email, the “$ git config –global –get user.name” and “$ git config –global –get user.email” commands are used. To show the credentials, the “$ git config –global credential.helper” command is utilized to show the credentials. The “$ git config –global gui.recentrepo” command can be utilized to view the recent repository. This guide determined the different commands to show global Git configurations.