Rewrite Commit History (Author & Committer) when I REALLY messed up my git user
rewrite-committer-author.bash
10 lines 385 B view raw
1git filter-branch --commit-filter ' 2 if [ "$GIT_COMMITTER_EMAIL" = "<Old Name>" ]; 3 then 4 GIT_COMMITTER_NAME="<New Name>"; 5 GIT_AUTHOR_NAME="<New Name>"; 6 GIT_COMMITTER_EMAIL="<New Email>"; 7 GIT_AUTHOR_EMAIL="<New Email>"; 8 git commit-tree "$@"; 9 else 10 git commit-tree "$@";