Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to develop on a branch in HG?

I would like to do some experimental work in a hg project. So I would like to create branch, commit to it. And if the experiment works, I can merge it back to main branch.

In git, I can do

$ git branch experimental
$ git checkout experimental
(edit file)
$ git commit -a
$ git checkout master

I've read A Guide to Branching in Mercurial. It said hg branch feature. But what is next? I don't follow.

like image 998
michael Avatar asked Apr 25 '10 23:04

michael


People also ask

How do you create a branch in Heartgold?

Creating a branch Branching can happen by committing a changeset within a single repository or by committing diverging changes in distinct (but related) repositories. Two repositories are said to be related if they were once cloned from the same repository but later may have diverged.


1 Answers

$ hg branch experimental

(edit file)
$ hg commit
$ hg update default
like image 190
sblom Avatar answered Oct 16 '22 14:10

sblom