Removing Github Commits

By | May 3, 2017

To rewrite history (not usually a good thing to do) you can do the following:

git reset –hard <commit hash>
git rebase -i HEAD~2 (the 2 goes back 2 commits)
git push origin +master

refresh github and you should see your commits disappear.

Leave a Reply

Your email address will not be published.