To show your global Git configuration, you can use the git config
command in your terminal or command prompt. Here’s how:
Command to Show Global Git Configuration
Run the following command:
git config --global --list
This command displays all the global configuration settings stored in Git. These settings include your user name, email, editor, and other preferences configured globally on your system.
Example Output
user.name=Your Name
[email protected]
core.editor=vim
color.ui=true
Viewing Specific Global Configuration
To view a specific global setting, use:
git config --global <key>
Example:
git config --global user.name
Output:
Your Name
Where Are Global Configurations Stored?
Global configurations are stored in a file located at:
- Linux/MacOS:
~/.gitconfig
- Windows:
C:\Users\<YourUsername>\.gitconfig
You can directly open this file to view or edit the configurations using a text editor, though using git config
commands is recommended.
Other Scopes for Git Configuration
Git has three configuration levels:
- System: Applies to all users on the system.
git config --system --list
- Global: Applies to the specific user (e.g., from
~/.gitconfig
).git config --global --list
- Local: Specific to a repository (from the
.git/config
file in the repo).git config --list
Use these commands to inspect the different scopes of Git configuration. Let me know if you need help modifying or troubleshooting your Git configuration!