Skip to content

Instantly share code, notes, and snippets.

@wstucco
Last active December 17, 2015 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wstucco/5579891 to your computer and use it in GitHub Desktop.
Save wstucco/5579891 to your computer and use it in GitHub Desktop.
change committer email and rewrite history
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "<email>" ];
then
GIT_COMMITTER_EMAIL="<new-email>";
GIT_AUTHOR_EMAIL="<new-email>";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment