Skip to content

Instantly share code, notes, and snippets.

@ifyouseewendy
Created March 25, 2015 09:20
Show Gist options
  • Save ifyouseewendy/f18ec9328eacdcd02e8d to your computer and use it in GitHub Desktop.
Save ifyouseewendy/f18ec9328eacdcd02e8d to your computer and use it in GitHub Desktop.
Update git commit history using git-filter-branch
git filter-branch -f --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "<Old name>" ];
then
GIT_COMMITTER_NAME="<New name>";
GIT_COMMITTER_EMAIL="<New email>";
GIT_AUTHOR_NAME="<New name>";
GIT_AUTHOR_EMAIL="<New email>";
else
git commit-tree "$@";
fi' -- --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment