I\'m not really familiar with how git works. I pushed a commit by mistake and want to revert it. I did a
git reset --hard HEAD~1
Bewar
I think you need to push a revert commit. So pull from github again, including the commit you want to revert, then use git revert and push the result.
If you don't care about other people's clones of your github repository being broken, you can also delete and recreate the master branch on github after your reset: git push origin :master.