Reputation: 145
Having run commands to change my author name on my repo I am now left with almost every single commit existing with both old and new author names.
How do I remove all the duplicate commits so that only one version of everything exists using only one author name?
Upvotes: 0
Views: 323
Reputation: 13387
Assuming you have used git filter-branch
, the original commits are available from, e.g., refs/original/refs/heads/master
. The rewritten ones are under refs/heads/master
aka master
. (Insert other branch names if you have them.)
If you clone the repository into a new directory, you should receive only master
, i.e., the rewritten commits.
You can also delete the original commits using
git update-ref -d refs/original/refs/heads/master
Upvotes: 1