0

I've accidently switched branches while having uncommitted changes. It seems that mercurial has automatically merged my changes, but there are conflicts left behind.

How can I go back to having my named branch checked out and commit my changes there?

1 Answer 1

0

It seems that mercurial has automatically merged my changes

In seems only for you (and your Mercurial), because for this toy-repo

@  2[tip]   e173e81c9fff   2016-07-08 10:09 +0500   lazybadger
|    Creating branch
|
o  1   befd1e011923   2016-07-08 10:06 +0500   lazybadger
|    Edit
|
o  0   45f15df3f7c9   2016-07-08 10:05 +0500   lazybadger
     Start

and dirty working dir at rev. 1

>hg id -nib
befd1e011923+ 1+ default
>hg st
M 1.txt

update to tip doesn't change content of file in working directory

>hg up Feature
0 files updated, 0 files merged, 0 files removed, 0 files unresolved

(note "0 files updated, 0 files merged") and working directory is still dirty

>hg id -nib
e173e81c9fff+ 2+ Feature

>hg st
M 1.txt

PS - you can just disable update to another changeset if your working directory isn't clean: use -c option as mandatory for all hg up (create alias)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.