git revert HEAD -m 1
In the above code line. "Last argument represents"
1 - reverts one commits.
2 - reverts last two commits.
n - reverts last n commits.
You need to push after this command to take the effect on remote. You have other options like specifying the range of commits to revert. This is one of the option.
Later use git commit -am "COMMIT_MESSAGE"
then git push
or git push -f