I’m moving to HG from Git and having a hard time with some of the restrictions HG is imposing on me:
I am in a situation where I have some erroneous commits that I want to blow away. In fact, It would be really nice if I could just match the remote repo’s history.
With git, this was easy as pie:
git reset --hard origin/branch_name
But how can I do it with Mercurial? From what I’ve heard, moving the ‘tip’ around can inadvertently spawn off anonymous branches if you don’t know what you are doing, which is very different from how git handles the same operation.
“Equivalent” for what you want is
hg stripfrom MQ extension, which you can use to “blow away” your commits.https://www.mercurial-scm.org/wiki/StripExtension
Another “equivalent” is:
http://www.selenic.com/mercurial/hg.1.html#update