Skip to content

Instantly share code, notes, and snippets.

@erdii
Forked from eito/gist:8108401
Created July 31, 2016 11:45
Show Gist options
  • Save erdii/7ecfa93661b73a3f4033cbd35bfeb455 to your computer and use it in GitHub Desktop.
Save erdii/7ecfa93661b73a3f4033cbd35bfeb455 to your computer and use it in GitHub Desktop.
git rewrite committer/author in history
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "<Old Name>" ];
then
GIT_COMMITTER_NAME="<New Name>";
GIT_AUTHOR_NAME="<New Name>";
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