From the course: Source Code Control in .NET with Git Using SourceTree

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

What is a branch? Why branch?

What is a branch? Why branch?

From the course: Source Code Control in .NET with Git Using SourceTree

Start my 1-month free trial

What is a branch? Why branch?

- [Instructor] So far we've been doing all of our work on the master branch. When we're working with two or more people, however, this can get awkward, as both users can be working on the same file and seeing changes while they're working. It's much cleaner to work on a branch. A branch simply says, I'm going to go off of master, do some work, and later I'll put that work back onto master, which we call merging. One of the things that makes Git so popular is that it is very easy to branch, and very easy to merge. There's a lot more branching and merging in a Git-based project than there is using other kinds of repositories. For example, let's say that User One wants to implement a new feature. Say a calculator. Rather than building that on the master branch, User One might decide to create a feature branch. All he has to do is click on Branch, give the new branch a name, and we'll call that branch Calculator. And then decide where they're branching from. Almost always, you will choose…

Contents