Generated image
|| #resource #git

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


Maybe try another one?

Docker: Use Container Env in Docker Exec How to use the container environment in a Docker Exec command
2021.05.09
Design is hard Creating random "glyphs" for each post 🎨
2024.08.30
Markdown Reference Everything you need to know to get started with Markdown ⌨️
2020.10.15