How to apply `git reset HEAD~1` on the Github instead of the local repository?

1.3k Views Asked by At

By mistake I committed changed to my main branch and pushed the changes to the server/Github. I want to completely get rid of the commit on GitHub.

The command git reset HEAD~1 undo the last commit locally. But if I do git pull I would get the changes from the server that I want removed.

How to make Github forget about my last commit? How can I apply git reset HEAD~1 on the server not just my local clone?

0

There are 0 best solutions below