Last active
February 12, 2016 19:20
-
-
Save codeaid/03ec04e9ce1d63fa9f34 to your computer and use it in GitHub Desktop.
Update git commit names and emails
This file contains hidden or 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 filter-branch --env-filter 'if [ $GIT_AUTHOR_EMAIL = [email protected] ]; then GIT_COMMITTER_NAME="New Name"; [email protected]; GIT_AUTHOR_NAME="New Name"; [email protected]; fi; export GIT_COMMITTER_NAME; export GIT_COMMITTER_EMAIL; export GIT_AUTHOR_NAME; export GIT_AUTHOR_EMAIL;' -f | |
git filter-branch --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ]; then export GIT_AUTHOR_NAME="New Email"; export [email protected]; export GIT_COMMITTER_NAME="New Name"; export [email protected]; fi; git commit-tree "$@"' | |
git filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = "Old Name" ]; then export GIT_AUTHOR_NAME="New Name"; export GIT_COMMITTER_NAME="New Name"; fi; git commit-tree "$@"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment