Hey, I want to revert some changesets in Hg but I'm having a hard time doing so.
I commited some changes by accident, so I wanted to undo that. After trying a little bit, I was able to hg backout
, but it created a new commit. Now, I wanted my repo to became to the initial state (without the last 2 commits and with my changes in the working dir). Apparently there's no way of doing that (something similar to git reset --soft
). Is there?
Another thing I tried was to get rid of the latest commit (the one that reverted the original one). It would be something similar to git reset --hard
, but again, there's no way to do that. I can hg update -C
, but that is more like git checkout
, since the commit is still out there.
And also, hg update -C -r X
reverts me back to revision X, but when I check hg log
there's no way for me to know in which revision I am right now. The only way is to check my bash history, is this right? There's gotta be a way to know this.
Anyway, I've been trying to sort this out for a while but couldn't find anything that would solve it. The references I found comparing git and hg commands are not accurate, since the commands don't have the exact same behavior.
I guess I just want to know what are the REAL equivalences in hg for git reset --hard
and git reset --soft
...
Thanks.