Git provides different configurations for a single repository or globally. The user email configuration is used to specify the user email address. The global configuration is used to set configurations globally for all repositories the user works with. The
git config --global user.email command is used to set user email addresses globally.
Display Git Global User Email
The global user email configuration can be listed below. If the global user email address is set and not empty it is displayed. If there is no global user email address nothing is displayed.
$ git config --global user.email
Set Git Config Global User Email
git config --global user.email command is provided to set user email address globally. The global configuration is stored inside the user’s home directory
.gitconfig file which path is like
~/.gitconfig . Single or double quotes should be used to provide the email address in order to prevent errors.
$ git config --global user.email "[email protected]"