From the course: Programming Foundations: Version Control with Git (2020)

Unlock the full course today

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

What is Git branching?

What is Git branching?

From the course: Programming Foundations: Version Control with Git (2020)

Start my 1-month free trial

What is Git branching?

- Let's say you're adding a new feature to a project that will take some time to build. You start working on it right away, but a week into building this new feature, a bug has popped up. You need to fix this bug right away, but the code you added for the new feature is not ready to go yet. This scenario is a perfect use case for using branches. With the Git branching workflow, the master branch is designated as the central repository. Instead of working in and committing directly to the master branch, all work is completed in a separate branch. For example. Each new feature will be developed in a designated feature branch and bug fixes will be updated in a big fix branch. It's branch is an independent line of development and Git makes no technical distinction between the master branch or any other branch. So we can apply all of the same Git commands to any of the branches. Once the work in the branch has been…

Contents