Branching and merging


show more Branching and merging provides you with in-depth training on Developer. Taught by Michael Lehman as part of the Fundamentals of Software Version Control show less
please wait ...

Branching and merging

Let's explore branching and merging in Hg. In Hg, branching and merging is very easy. First, let's run hg branch and see that there is only one branch default, and that's the one we're on. Sometimes it's called the trunk. But in Hg, it's called the default. So to create a branch, we say hg branch b1. Now notice it says mark the working directory as branch b1. It hasn't actually done the branch yet, so we have to commit it to make the branch. Okay, now if we say hg branch, you can see we're on branch b1, and if we see hg branches, you can see there are two branches, b1 and default.

Now to work with a branch we simply update to the branch, hg update b1, and we ask hg branch it tells we're on b1, and if we say hg update default and we type hg branch, we're back on the default branch. So let's go back to branch b1 and make a change. So we'll add another feature to our little haiku up here "No more available space," "Look to the cloud,"...

Branching and merging
Video duration: 4m 29s 2h 55m Intermediate

Viewers:

Branching and merging provides you with in-depth training on Developer. Taught by Michael Lehman as part of the Fundamentals of Software Version Control

Subject:
Developer
Software:
Git Mercurial ALM/TFS Perforce
Author:
please wait ...