Last active
February 12, 2016 19:20
Revisions
-
codeaid revised this gist
Feb 12, 2016 . 1 changed file with 45 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,47 @@ # # More information @ http://schacon.github.io/git/git-filter-branch.html # # Rewrite using environment filter git filter-branch --env-filter \ 'if [ $GIT_COMMITTER_EMAIL = old@email.com ]; then GIT_COMMITTER_NAME="New Name"; GIT_COMMITTER_EMAIL=new@email.com; GIT_AUTHOR_NAME="New Name"; GIT_AUTHOR_EMAIL=new@email.com; fi; export GIT_COMMITTER_NAME; export GIT_COMMITTER_EMAIL; export GIT_AUTHOR_NAME; export GIT_AUTHOR_EMAIL;' \ -f # Rewrite using commit filter git filter-branch --commit-filter \ 'if [ "$GIT_COMMITTER_EMAIL" = "old@email.com" ]; then export GIT_AUTHOR_NAME="New Name"; export GIT_AUTHOR_EMAIL=new@email.com; export GIT_COMMITTER_NAME="New Name"; export GIT_COMMITTER_EMAIL=new@email.com; fi; git commit-tree "$@"' # Only rewrite the name git filter-branch --commit-filter \ 'if [ "$GIT_COMMITTER_NAME" = "Old Name" ]; then export GIT_AUTHOR_NAME="New Name"; export GIT_COMMITTER_NAME="New Name"; fi; git commit-tree "$@"' # Only rewrite the email git filter-branch --commit-filter \ 'if [ "$GIT_COMMITTER_EMAIL" = "old@email.com" ]; then export GIT_AUTHOR_EMAIL=new@email.com; export GIT_COMMITTER_EMAIL=new@email.com; fi; git commit-tree "$@"' -
codeaid created this gist
Nov 22, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ git filter-branch --env-filter 'if [ $GIT_AUTHOR_EMAIL = olde@email.com ]; then GIT_COMMITTER_NAME="New Name"; GIT_COMMITTER_EMAIL=new@email.com; GIT_AUTHOR_NAME="New Name"; GIT_AUTHOR_EMAIL=new@email.com; 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" = "old@email.com" ]; then export GIT_AUTHOR_NAME="New Email"; export GIT_AUTHOR_EMAIL=new@email.com; export GIT_COMMITTER_NAME="New Name"; export GIT_COMMITTER_EMAIL=new@email.com; 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 "$@"'