I recently realized that in a Github repository that I use for work, my commits are not associated with my Github account but just show my name without any link. I figured out this is because I had my email set in git to my work email, but my Github account is associated with my personal email. I have changed my email in git, but I wanted to try to change the author on all my past commits so they'd all show as my Github account. I found this StackOverflow question and I used this command from the answer since no one other than me has touched this repository:
git rebase -r --root --exec "git commit --amend --no-edit --reset-author"
However when I pushed this back to Github, it now shows a duplicate of every commit dated today with my Github account as an author, while all the previous commits are still there. How can I clean up this mess? At this point I wouldn't mind just somehow removing all these duplicate commits and going back to having the commit history not be linked to my account.