Reset Git Commit Author

How to reset the author of one (or more) git commits

Reset Author (1 commit)

Change the git author data (username + email) and then run:

git commit --amend --reset-author

When the editor exits, the new author will be saved to that commit.

Reset Author (> 1 commits)

When trying to change the author of more than just the most recent commit, git rebase must be used.

The process for this goes something like this.

Step 1: Start rebase

# Replace X with the number of commits to go back
git rebase HEAD~X

Step 2: Select edit for all commits

Step 3: For each commit, reset author then continue rebase

git commit --amend --reset-author
git rebase --continue

Related