danieljoos / libkafka-asio

C++ Kafka Client Library using Boost Asio
MIT License
76 stars 40 forks source link

commit history correction #10

Closed DEvil0000 closed 9 years ago

DEvil0000 commented 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.

danieljoos commented 9 years ago

Done!