I would like to permanently remove specified commits from the entire history of a git repository. I saw this thread, in which the following is recommended:
git reset --hard HEAD~4
git push origin HEAD --force
That's fine and resets the status of my repository, but in no way does it remove my commits. I would like to literally roll back history and discard changes to the repo since 4 revisions ago.
Could anyone help me with this? When I try the above and look at the revision history in Github, I still see unwanted commits sitting there.
I saw this article, but I wanted to check whether or not there were other options before investigating this solution.