How to undo a revert in git?
<p>I need to undo a revert done in git and pushed to a remote repository. The repository is not used by anyone else. I did this with the backthought that a revert is just another commit. Thus I tried git reset and then push but it did not seem to work. Does anyone know how this can be done?</p>

<pre><code>-&gt; git reset --hard HEAD~1
HEAD is now at ee7abe9 &lt;msg&gt;
-&gt; git push -f origin myBranch
Total 0 (delta 0), reused 0 (delta 0)
remote: Processing changes: done    
To 'ssh://remoteRepo'
  ! [remote rejected] mo_cache-BLACK -&gt; mo_cache-BLACK (non-fast forward)
error: failed to push some refs to 'ssh://remoteRepo'
</code></pre>