When using Mercurial, how do you undo all changes to the working directory since the last commit? It seemed like it would be easy, but it eluded me.
For example, suppose I have 4 commits. Then I make some changes to my code. Then I decide that my changes are bad, and I just want to return to the state of the code the last time I committed it. So, I think I should do:
hg update 4
at the same time 4 is a revision No. of my last fixation. But Mercurial does not change any of the files in my working directory. Why not?
version-control mercurial
Johnny Beegood Jul 09 2018-10-09T00: 00Z
source share