Change author info with Github guide doesn't work

Viewed 129

I am trying to change the author info in a Git repository uploaded on Github. I went to the Github page and they show a guide to change the author in the commits. I have the following code

git filter-branch --env-filter '
OLD_EMAIL="Admin@user"
CORRECT_NAME="hernan232"
CORRECT_EMAIL="hdvanegasm@unal.edu.co"
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

When I run the code, it works, but when I execute

git push --force --tags origin 'refs/heads/*'

It shows "Everything up-to-date". And I go to the Github repository and anything changes. Can you help me with this?

2 Answers

I might be wrong, but I think the last command is just pushing the tags. To push all the branches (including master), you need to run git push --force --all first.

I tested on a personal repo and I got the same message as you (and I didn't have any tags created yet -- maybe this is why it's "up to date"). Running the command above I managed to push.

Related