Mercurial - revert back to old version and continue from there
- by Paolo
I'm using mercurial locally for a project (it's the only repo there's no pushing/pulling to/from anywhere else).
To date it's got a linear history. However, the current thing I'm working on I've now realised is a terrible approach and I want to go back to the version before I started it and implement it a different way.
I'm a bit confused with the branch / revert / update -C commands in Mercurial. Basically I want to revert to version 38 (currently on 45) and have my next commits have 38 as a parent and carry on from there. I don't care if revisions 39-45 are lost for ever or end up in a dead-end branch of their own.
Which command / set of commands do I need?