How to know the git username and email saved during configuration?

Jebin Philipose picture Jebin Philipose · Oct 25, 2017 · Viewed 138.9k times · Source

While configuring git I ran these two commands:

git config --global user.name "My Name"

git config --global user.email "[email protected]"

However, I doubt whether I made a typo or not. So, is there any command to know the name and email which git saved during configuration? Obviously, I can know that using the git log command by looking at the commit history. But for that I have to make commits, right? Can I know that with the help of command line?

Answer

Rob picture Rob · Oct 25, 2017

The command git config --list will list the settings. There you should also find user.name and user.email.