git config --global user.email 'alice@example.com'

Category: Git - Core

git config --global user.email 'alice@example.com'

Set your global Git email

Writes the email used in commit authorship into ~/.gitconfig. Many hosting services attribute commits by this email, so it should match the one on your account. Check the current value with git config --global user.email.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.