Make another branch default?

Just merge feature-branch into default then close feature-branch:

$ hg checkout default
$ hg merge feature-branch
$ hg commit
$ hg checkout feature-branch
$ hg commit --close-branch

There is no more clean and sensible way (that I’m aware of) to “make feature-branch the default”.

One thing that wouldn’t be as nice, but you could do, is to make a commit to default on top of feature-branch:

$ hg checkout feature-branch
$ hg branch default
$ hg commit

But this would leave two heads in the default branch, which is suboptimal.

Leave a Comment