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.
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?
I have not pushed or pulled or anything else since the commit.
You may suspect this is a duplicate, so I will explain why the following questions are different, or do not answer my question:
An answer to this one states that you can do this with hg commit --amend
, but does not explain how or give an example of doing this. The mercurail help does not spell it out for me either.
How do you "rollback" last commit on Mercurial?
States to use hg rollback
. This command is apparently deprecated, I tried using it anyway, but I got the messge: no rollback information available. A shame this doesn't work as this would be a really intuitive way to achieve what I want.