Last active
December 30, 2015 00:09
-
-
Save netwjx/7747185 to your computer and use it in GitHub Desktop.
修改git提交历史中的指定用户
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
#!/bin/bash | |
export fan=$1 | |
export an=$2 | |
export ae=$3 | |
git filter-branch -f --commit-filter ' | |
if [ "$GIT_AUTHOR_NAME" = "$fan" ]; | |
then | |
GIT_COMMITTER_NAME="$an"; | |
GIT_COMMITTER_EMAIL="$ae"; | |
GIT_AUTHOR_NAME="$an"; | |
GIT_AUTHOR_EMAIL="$ae"; | |
git commit-tree "$@"; | |
else | |
git commit-tree "$@"; | |
fi' HEAD |
Author
netwjx
commented
Dec 2, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment