Reverting a merge in Mercurial
I did a merge, but then I stuffed it up, so I decided to revert back. I have tried to revert to one of the revisions I merged several times, but this doesn't work. It doesn't t开发者_JAVA百科hrow any errors, it is just that my current repository state is still shown as having two heads. I also tried deleting all of the backup files that reversion automatically creates. How can I restore my repository to a clean state on one of the heads?
Try hg update -C
to one of the heads, or any revision.
To avoid the situation, instead of reverting you can just commit the unwanted merge, then strip it later.
精彩评论