github

How can modifiy last commit user details In Git

  • Profile picture of Mcs
  • by Mcs July 15, 2025

Change Author Info of the Last Commit

git commit --amend --author="New Name <new.email@example.com>"

This allows you to change the author of the most recent commit.

Then Push the Change (if already pushed)
If you've already pushed the commit to a remote, you must force-push the amended commit:

git push --force