I rewrote the history of the GitHub repository two weeks ago (rebase and some cherry picks), and the force pushed it back to GitHub via
git push -f origin master
Everything went fine, at least it looked like this, and git log showed the correct commit history. I know that rewriting history is bad practice, but the repository is new and I am the only user, so there should not be any problems for others.
My repository has only one branch named master .
Now to my problem. My repository's GitHub Source view displays at least one message that should no longer exist due to my rewriting of history. And indeed, this does not exist in my local or GitHub commit log (but it is part of my local reflog). How can I get rid of this commit and possibly others that are in my remote GitHub repository? Is there a way to clear the remote repository and delete those “unreachable” commits that are not part of the commit log?
By the way, if I clone a GitHub repository, the scammer is not present in the clone. git show <SHA1> returns fatal: bad object .
My question is very similar to SO 4367977 , but the solution to this question, “awaiting GitHub garbage collection”, obviously does not work. Link commits still work after 6 months.
Removing the repository and re-creating it should solve the problem, but it's not very elegant.
Thanks in advance!
source share