diff --git a/changeuser.sh b/changeuser.sh new file mode 100755 index 0000000..adacdf8 --- /dev/null +++ b/changeuser.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +git filter-branch --commit-filter ' +if [ "$GIT_COMMITTER_NAME" = "OLD_USERNAME" ]; +then + GIT_COMMITTER_NAME="NEW_USERNAME"; + GIT_AUTHOR_NAME="NEW_USERNAME"; + GIT_COMMITTER_EMAIL="EMAIL_NEW_USERNAME"; + GIT_AUTHOR_EMAIL="EMAIL_NEW_USERNAME"; + git commit-tree "$@"; +else + git commit-tree "$@"; +fi' HEAD