Cheat Sheets · Git Cheat Sheet · Git Change Commit Author — Email & Name

Git Change Commit Author — Email & Name

Latest Commit

git commit --amend --author="Name " --no-edit

Future Commits

git config user.email "email@example.com"

Global Default

git config --global user.name "Name"

Author correction patterns

ScopeCommandUse Case
Latest Commitgit commit --amend --author="Name <email@example.com>" --no-editUpdate author on top commit without changing message
Future Commitsgit config user.email "email@example.com"Fix email for all future commits in current repository
Global Defaultgit 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 Builder

Full reference: Git Cheat Sheet