Reputation: 11377
In my project I would like to continue development from an earlier revision. So far I have done
$ hg up -r REV
and committed a changeset. How do I "get rid of" the old branch that I'm no longer interested in so I can push the repository without the force option?
Upvotes: 0
Views: 71
Reputation: 11377
To undo the last N commits (but without changing the history), do the following:
Revert the working directory to the desired revision:
$ hg revert -aC -r -<N + 1>
Commit the changes:
$ hg ci -m "Undo N changesets"
Now this branch can be merged with the other one.
Upvotes: 1