title: Git push after reset
body: <p>I committed some unnecessary code so I used:
  <code>git reset HEAD~</code></p>
  
  <p>I checked out the files and tried to push my last commits (which were correct). However, I'm receiving error: <code>error: failed to push some refs to 'git@github.com:MyProject/MyProject.git'
  hint: Updates were rejected because the tip of your current branch is behind
  </code>
  which is probably since the commit is not reverted correctly since when I do git pull, the commit is back again. 
  How can I correctly revert this commit?</p>
  
  <p>additional info: <code>git status</code> gives me:</p>
  
  <pre><code>Your branch is behind 'origin/Mybranch' by 1 commit, and can be fast-forwarded.
  </code></pre>