I'm new to Mercurial, and DVCS in general. What's the difference between a head and a branch?
The term 'branch' may thus refer to a 'diverged line of development'. For Mercurial, a 'line of development' is a linear sequence of consecutive changesets.” In other words, we spawn off a new line of development from a base (or “parent”) state of the code.
From the main menu, select Hg | Mercurial | Update to. In the Switch Working Directory dialog that opens, specify the target working directory: To switch to another line of development, choose Branch and select the desired branch from the list.
You cannot. You can close the branch to hide it from the list of active branches, but you cannot completely delete it. This happens because in mercurial and in git the "branch" term means different things. In mercurial - it is a set of changesets.
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.
If you view it as a tree, then a head is a leaf, at the very end of a branch.
It's explained really well at Mercurial's own wiki:
Branches
Heads
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With