Set username and email globally
git config --global user.name "John"
git config --global user.email "johndoe@gmail.com"
Check if we have set the Git username and email globally
git config --global user.name
git config --global user.email
Set username and email for a single repository
git 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
by Valeri Tandilashvili
4 years ago
Git
Git Tutorial - Learn Command-line Git & GitHub
1
Pro tip: use ```triple backticks around text``` to write in code fences