git config --global user.name "John"
git config --global user.email "johndoe@gmail.com"
Check if we have set the Git username and email globallygit config --global user.name
git config --global user.email
Set username and email for a single repositorygit config user.name "John"
git config user.email "johndoe@gmail.com"
Check if we have set the Git username and email locally (for a single repository)git config user.name
git config user.email