Skip to content

Instantly share code, notes, and snippets.

@coto
Last active October 12, 2015 19:08
Show Gist options
  • Save coto/4073869 to your computer and use it in GitHub Desktop.
Save coto/4073869 to your computer and use it in GitHub Desktop.
Rename commiters
git filter-branch -f --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "OLD_EMAIL" ];
then
GIT_COMMITTER_EMAIL="NEW_EMAIL";
GIT_AUTHOR_EMAIL="NEW_EMAIL";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
git push origin master --force
git filter-branch -f --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "OLD_NAME" ];
then
GIT_COMMITTER_NAME="NEW_NAME";
GIT_AUTHOR_NAME="NEW_NAME";
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