I have various private GitHub repos and use Sublime Merge to manage my commits.
I want to change all the previous commit author details:
From Name: This, Email: this@domain.com
To: Name: That, Email: that@domain.com
I have therefore followed these instructions from GitHub and amended the code to the following:
#!/bin/sh
git filter-branch -f --env-filter '
CORRECT_NAME="That"
CORRECT_EMAIL="that@domain.com"
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
' --tag-name-filter cat -- --branches --tags
On one of the repos this worked and before I used git push --force --tags origin 'refs/heads/*'
from the instrucitons Sublime Merge showed the potential changes and after running the push all the commits were now updated to the desired details.
All good, so I thought, until I tried this with several of my other repositories and no change shows in sublime and the push does nothing. I have no idea why there is a difference. The other repositories are similar in the fact they all have the same original committer.
Why does this not work for the other repos and how can I fix to allow me to do the changes?