The right way to jump back and forth between two branches?

If I create a branch:

hg branch branch-A

and fix it:

hg commit -m "improvement A-1"

and then create a second branch:

hg branch branch-B

and fix it:

hg commit -m "improvement B-1"

If I want to add my next change to branch-A, just type:

hg branch branch-A

and fix it as before:

hg commit -m "improvement A-2"
+5
source share
1 answer
hg branch

always creates a branch (although it warns you if the branch already exists.) To switch to an existing branch,

hg update -r <some revision in that branch>

or

hg update <that branch>

will switch to this branch.

+10
source

All Articles