Created
September 19, 2017 16:24
-
-
Save fivemini/adc6cd6e2a47f9ee158c1e3770bf68ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --summary --pretty=full | less | |
git filter-branch --commit-filter ' | |
if [ "$GIT_AUTHOR_EMAIL" = "oldname@users.noreply.github.com" ]; | |
then | |
GIT_AUTHOR_NAME="newname"; | |
GIT_AUTHOR_EMAIL="newname@users.noreply.github.com"; | |
GIT_COMMITTER_NAME="newname"; | |
GIT_COMMITTER_EMAIL="newname@users.noreply.github.com"; | |
git commit-tree "$@"; | |
else | |
git commit-tree "$@"; | |
fi' HEAD | |
git reflog expire --expire=now --all | |
git gc --aggressive --prune=now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment