I have some orphaned commits accidentally committed to GitHub.
I use git gc --prune=now --aggressive
to remove them from git rev-list --all
.
But git show foo_commit
still shows the commit contents.
Then is there one way to remove that commit completely? I expects the commit won’t be showed in Github. For example, if the commit to delete has message “#1”, then in the Github #1 issue it won’t show something like “Someone added a commit that referenced this issue … foo_commit”.