Git Cheat Sheet/Set global user name

Set default author name.

Section: Setup and Configuration

Set global user name

bash
bash
git config --global user.name "Your Name"

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 email
Set default author email.
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