Lesson 4-2
Why is Branching important?
As you already know, GitHub is a great tool for development of a project because of Version Control. Branching is yet another element of Version Control that makes it easier to track, and separate the work you have completed from that of what you are working on. It is said about branching that you should "branch early, and branch often" so that you can better track the work that you do.
Moreover, Branching helps in being able to revert from any changes that you make. If you have a stable product, it is best to Branch it out in the "main" branch (the default one), and use a separate branch in each instance of the project to make sure that you separate different parts. In my case, I will make a branch for each chapter, then git merge branches as I finish each chapter of this text.
The way it works is simple. When you make a Branch, it takes all files from main and makes a duplicate in the new one you make. Then, as you git checkout from main to your new branch, you will git commit code only to that branch. This allows you to be able to see new changes without messing with the entire application. Now, in 4-3, I will show you how to create and use a branch.