Skip to content

Instantly share code, notes, and snippets.

@pshchelo
Last active December 27, 2015 04:09
Show Gist options
  • Save pshchelo/7265055 to your computer and use it in GitHub Desktop.
Save pshchelo/7265055 to your computer and use it in GitHub Desktop.
change git author emails by REWRITING HISTORY
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "WRONG_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