UpTheCreek
UpTheCreek

Reputation: 32401

How to properly revert from botched merges in Mercurial?

Sometimes a merge will cause the manual diff tool (in my case KDiff) to open, and sometimes it's not possible to resolve the merge properly manually. If I close the diff tool without saving, then I get something like

1 files unresolved

use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon

I'm not really sure what state my workspace is in at this point.

Is there any easy way after this happens to get back to the state I was in before I issued hg merge?

Upvotes: 0

Views: 27

Answers (1)

Mubin
Mubin

Reputation: 4239

You can revert the recent merge using hg update -C -r . But be informed that it will also remove any uncommitted changes.

The . after -r refers to last revision number.

Upvotes: 2

Related Questions