title: Git revert last commit in heroku
body: <p>I made acommit and pushed it to origin and heroku</p>
  
  <p>Then I realised it was wrong, so I did</p>
  
  <pre><code>git reset --soft HEAD^ 
  </code></pre>
  
  <p>But when I'm pushing to Heroku Im getting</p>
  
  <pre><code>To git@heroku.com:app.git
   ! [rejected]        master -&gt; master (non-fast-forward)
  error: failed to push some refs to 'git@heroku.com:app.git'
  To prevent you from losing history, non-fast-forward updates were rejected
  Merge the remote changes (e.g. 'git pull') before pushing again.  See the
  'Note about fast-forwards' section of 'git push --help' for details.
  </code></pre>
  
  <p>I understand the problem. How should I proceed? How can I revert also last heroku commit? (I assume would be the best solution)</p>