Created
April 12, 2010 14:48
-
-
Save ichikaway/363632 to your computer and use it in GitHub Desktop.
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のコミットログの、AuthorやEmailを後で一括で書き換える方法 | |
//OldNameにマッチする人を置換 | |
git filter-branch --commit-filter ' | |
if [ "$GIT_COMMITTER_NAME" = "OldName" ]; | |
then | |
GIT_COMMITTER_NAME="Yasushi Ichikawa"; | |
GIT_AUTHOR_NAME="Yasushi Ichikawa"; | |
GIT_COMMITTER_EMAIL="[email protected]"; | |
GIT_AUTHOR_EMAIL="[email protected]"; | |
git commit-tree "$@"; | |
else | |
git commit-tree "$@"; | |
fi' HEAD | |
//全てのコミットログの名前を変換 | |
git filter-branch --commit-filter ' | |
GIT_AUTHOR_NAME="Yasushi Ichikawa" | |
GIT_AUTHOR_EMAIL="[email protected]" | |
GIT_COMMITTER_NAME="Yasushi Ichikawa" | |
GIT_COMMITTER_EMAIL="[email protected]" | |
git commit-tree "$@" | |
' HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment