Mistake commit can happen. This is how to revert & push.
git reset --hard <commit-hash>
git push -f origin master
With this method mistake commit will lost forever. If you work with other people DO NOT do this way. For more infomation please follow this link.
Resetting remote to a certain commit
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share…