Cheat Sheets · Git Cheat Sheet · Git Change Commit Author — Email & Name
Git Change Commit Author — Email & Name
Latest Commitgit commit --amend --author="Name
Future Commitsgit config user.email "email@example.com"
Global Defaultgit config --global user.name "Name"
Author correction patterns
| Scope | Command | Use Case |
|---|---|---|
Latest Commit | git commit --amend --author="Name <email@example.com>" --no-edit | Update author on top commit without changing message |
Future Commits | git config user.email "email@example.com" | Fix email for all future commits in current repository |
Global Default | git config --global user.name "Name" | Set default identity across your entire system |
Fix accidental personal email or wrong author name on your commits before pushing to public repositories.
Related Git recipes
FAQ
Does changing author rewrite the commit SHA?
Yes. Any modification to author, email, timestamp, or message produces a new commit SHA.
Can I change author on older pushed commits?
Yes, via interactive rebase or git-filter-repo, but it rewrites history. Use caution on shared branches.
What is the difference between author and committer?
Author wrote the code; committer applied the commit (e.g. cherry-pick or rebase). --amend updates author; committer becomes the current user.
Stop memorizing — build it interactively
Try author commands in the Git BuilderFull reference: Git Cheat Sheet