git reset branch to previous commit and push code example
Example 1: revert git commit
git revert <the_commit_hash>
Example 2: git reset remote
# local
git reset <commit-hash>
# or
git reset --hard <commit-hash>
# remote
git push -f origin master