title: git push rejected: error: failed to push some refs
body: <p>I know people have asked similar questions, but I believe the causes of their problems to be different.  I did a hard reset because I had messed up my code pretty bad</p>
  
  <pre><code> git reset --hard 41651df8fc9
  </code></pre>
  
  <p>I've made quite some changes, I've made some commits and now that I'm trying to push all these commits into the server I get the following error:</p>
  
  <pre><code> ! [rejected]        master -&gt; master (non-fast-forward)
  error: failed to push some refs to 'git@git.somewhere.git'
  </code></pre>
  
  <p>Git suggests to do a git pull and that's what other people have suggested to other users.  However, I believe that a git pull will merge my current code with the code that I don't want anymore (head revision).
  How can I do a push and forget about the version/revisions ahead of me?</p>