When you want to query all global Git configurations on your current computer, you can use the following Git command:
bashgit config --global --list
This command lists all global configurations stored in the .gitconfig file within your user's home directory. For example, it displays user name, email, diff tools, and aliases.
If you want to view a specific global setting, you can use the following commands:
bashgit config --global user.name git config --global user.email
These commands respectively show the user name and email configured globally.
For instance, if you have set up global configurations on your machine—such as your user name and email, and aliases for common commands—executing git config --global --list might produce the following output:
plaintextuser.name=John Doe user.email=johndoe@example.com alias.st=status alias.co=checkout alias.br=branch alias.ci=commit
In this output, you can see the user name is "John Doe", the email is "johndoe@example.com", and several command aliases are defined, such as using st instead of status and co instead of checkout.