title: Mercurial: how to undo last unpushed commit?
body: <p>I have accidentally made a commit to my local repository. To be more specific, I committed changes to lots of files all at once, when I meant to commit them one at a time. </p>
  
  <p>How do I undo this commit and get my working copy back to the state it was before the commit so I can do what I should have done in the first place?</p>
  
  <p>I have not pushed or pulled or anything else since the commit. </p>
  
  <hr>
  
  <p>You may suspect this is a duplicate, so I will explain why the following questions are different, or do not answer my question:</p>
  
  <p><a href="https://stackoverflow.com/questions/4760684/mercurial-undo-last-commit">Mercurial undo last commit</a></p>
  
  <p>An answer to this one states that you can do this with <code>hg commit --amend</code>, but does not explain <em>how</em> or give an example of doing this. The mercurail help does not spell it out for me either.</p>
  
  <p><a href="https://stackoverflow.com/questions/20470874/how-do-you-rollback-last-commit-on-mercurial">How do you &quot;rollback&quot; last commit on Mercurial?</a></p>
  
  <p>States to use <code>hg rollback</code>. This command is apparently deprecated, I tried using it anyway, but I got the messge: <em>no rollback information available</em>. A shame this doesn't work as this would be a really intuitive way to achieve what I want.</p>