I have done several commits with a wrong user, so I have renamed that commits with this script:
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="user2@example.com"
CORRECT_NAME="user1"
CORRECT_EMAIL="user1@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags
git push --force --tags origin HEAD:master
After that, I check https://github.com/MIUSER/MYREPO/commits/master and I can see that It have worked: Author have been correctly change. Also, I check https://github.com/MIUSER/MYREPO/graphs/contributors and I see that the wrong author has disappeared.
But when I go to https://github.com/MIUSER/MYREPO and check the "Contributors" section in the right column I can still see the wrong author.
What can I do in order to fix that?