Skip to content

Instantly share code, notes, and snippets.

@VictorHugoBatista
Last active January 25, 2021 13:51
Show Gist options
  • Save VictorHugoBatista/898b0000fca940fb2517753ad11eb7d9 to your computer and use it in GitHub Desktop.
Save VictorHugoBatista/898b0000fca940fb2517753ad11eb7d9 to your computer and use it in GitHub Desktop.
git filter-branch -f --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "<old-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