You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that I discovered git-filter-repo I want to fix an old commit in a personal repository where I accidentally (once) committed/pushed using my work credentials (several commits ago).
Resign new commits: git filter-branch -f --commit-filter 'git commit-tree -S "$@"' HEAD
That does indeed correct the committers and make sure all commits are signed/verified. However, all tags are still pointing the original commits (including the one with the wrong committer) instead of the new ("replacement") commits.
How can I also rewrite tags when rewriting committers?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Now that I discovered git-filter-repo I want to fix an old commit in a personal repository where I accidentally (once) committed/pushed using my work credentials (several commits ago).
This is what I tried:
git filter-repo --email-callback 'return b"[email protected]"' --name-callback 'return b"me"'
git filter-branch -f --commit-filter 'git commit-tree -S "$@"' HEAD
That does indeed correct the committers and make sure all commits are signed/verified. However, all tags are still pointing the original commits (including the one with the wrong committer) instead of the new ("replacement") commits.
How can I also rewrite tags when rewriting committers?
Beta Was this translation helpful? Give feedback.
All reactions