title: Git: How to perform hard push
body: <p>I pushed a commit to the remote repository and I want to undo that commit.</p>
  
  <p>To undo the commit in my local repository I used<br>
  <code>git reset --hard prev_commit_hash</code><br>
  (By the way, is this the proper way to do that?)</p>
  
  <p>Then I tried to push, and failed, because the tip of my current branch is behind its remote counterpart, as I expected.  </p>
  
  <p>The question is: What is the proper way to perform a hard/forced push?  </p>
  
  <p>Edit:<br>
  I viewed some of the other similar questions asked, but they were a little old.
  The suggested solution was using <code>git revert</code>. And I saw that recently users commented that this solution is not working for them. </p>