Closed DEvil0000 closed 9 years ago
If you want to correct the history we should do it better now instead of later. I have tested the following script on my system:
#!/bin/sh git filter-branch --env-filter ' OLD_EMAIL="root@75dd17ad782e.(none)" OLD_EMAIL2="DEvil0000@github.com" CORRECT_NAME="DEvil0000" CORRECT_EMAIL="DEvil0000@users.noreply.github.com" if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] || [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL2" ] then export GIT_COMMITTER_NAME="$CORRECT_NAME" export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" fi if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ] || [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL2" ] then export GIT_AUTHOR_NAME="$CORRECT_NAME" export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL" fi ' --tag-name-filter cat -- --branches --tags
after executing this script all your branches have corrected history and you can push --force them to github.
push --force
Done!
If you want to correct the history we should do it better now instead of later. I have tested the following script on my system:
after executing this script all your branches have corrected history and you can
push --force
them to github.