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

The last major piece of functionality we need to explore is branching and merging. In Git, branching and merging is very easy and very lightweight. So first, let's run Git branch. We can see we are on the master branch. This is sometimes called the trunk. To create a branch is as easy as saying git branch b1, and now we have a new branch, you can see we have branches b1 and master. And you can see between the asterisk and the text in green, they we're on the master branch.

So in order to make changes in the branch and work with that, we need to check that branch out and then we can make updates. So git checkout b1, I can see it says we switch to branch b1. If we do git branch, you can see we are on branch b1, so now we'll go and update our file and add a new feature. One more haiku. "No available space," "Look to the cloud," "Your drive is full".

I will save that, we will exit, and then we'll commit that in the branch. Now if we say git log, you can see...

Branching and merging
Video duration: 3m 44s 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 ...