Git Cheat Sheet/Set global email

Set default author email.

Section: Setup and Configuration

Set global email

bash
bash
git config --global user.email "you@example.com"

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Setup and Configuration
Set global user name
Set default author name.
OpenIn sheetbashsame section
Set default editor
Choose editor for commit messages and interactive rebase.
OpenIn sheetbashsame section
Set default branch name
Use main for new repositories.
OpenIn sheetbashsame section
Set pull to rebase by default
Avoid merge commits on pull.
OpenIn sheetbashsame section
Enable rerere
Reuse recorded resolution for repeated conflicts.
OpenIn sheetbashsame section
Create status alias
Add a short alias.
OpenIn sheetbashsame section