Last active
August 29, 2015 14:13
-
-
Save amaya382/595a2d9c8fc99819c289 to your computer and use it in GitHub Desktop.
過去のcommitのユーザ名とメールアドレスを一括書き換え
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 -f --commit-filter ' | |
if [ "$GIT_AUTHOR_EMAIL" = "{old email}" ]; | |
then | |
GIT_AUTHOR_NAME="{new name}" | |
GIT_AUTHOR_EMAIL="{new email}" | |
GIT_COMMITTER_NAME="{new name}" | |
GIT_COMMITTER_EMAIL="{new email}" | |
git commit-tree "$@" | |
else | |
git commit-tree "$@" | |
fi' HEAD | |
# and then | |
git push -f origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment