Skip to content

Instantly share code, notes, and snippets.

@khorsmann
Created October 25, 2017 07:58
Show Gist options
  • Save khorsmann/f35a03fb32f848c096fef887e1366276 to your computer and use it in GitHub Desktop.
Save khorsmann/f35a03fb32f848c096fef887e1366276 to your computer and use it in GitHub Desktop.
how-to-amend-several-commits-in-git-to-change-author
git filter-branch --env-filter 'if [ "$GIT_AUTHOR_EMAIL" = "wrong-email@address.example" ]; then
GIT_AUTHOR_EMAIL=correct-email@address.example;
GIT_AUTHOR_NAME="Your Name";
GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL;
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; fi' -- --all
git push origin master -f
https://stackoverflow.com/questions/4981126/how-to-amend-several-commits-in-git-to-change-author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment