How do you abandon all repository changes since the last commit in Mercurial?
I don’t think that this is the revert command, because that will actually update the working directory to the last commit. I just want to undo changes in the repository (added files, removed files, etc).
But, I’m new with Mercurial, so I could be missing something.
You do want
revert. The two commandsrevertandupdateare complimentary. They both update the files in your working directory, butupdatealso updates the parent revision (seehg parents) whereasrevertdoesn’t. If your parent revision wastip, which it often is, then either would do in this case, but preferrevert.Example: