From the course: Git for System Administration

Unlock the full course today

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

Why branch?

Why branch? - Git Tutorial

From the course: Git for System Administration

Start my 1-month free trial

Why branch?

- [Instructor] One of the most powerful features of Git is branching. Branching allows us to try new ideas, switch between branches quickly, and allow collaboration on new features without disrupting current ones. You may be wondering why we'd mess with the complexity since I've already shown you how to edit files, commit them, and then roll back the changes. Let me explain. Remember that when we roll back the changes, we're creating a new commit that makes new changes to current files to make them match old files. Wouldn't it be nice if we could just make a test copy of our files, make changes to them, and then test them in a non-production environment? If we like the changes, we merge them back into our production files. If we don't like the changes, we just throw the test files away. This is what branching does. Git is designed from the beginning to branch and is quite easy to use. Once you've integrated branching into your workflow, you won't go back.

Contents