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
You can do git push --force but be aware that you are rewriting history and anyone using the repo will have issue with this.
git push --force
If you want to prevent this problem, don't use reset, but instead use git revert
git revert