Let's understand git branching

git image
Posted on March, 2021

“Branch” is not an unfamiliar word. It is too common to hear the words such as the branch of a tree, branch of a bank, a branch of science, etc. We use them quite often in our lives. Today, you will link another meaning to the word “branches” in your already existing vocabulary. This new type of branch is Git Branch.

In Git, branches are a part of your everyday development process. Git branches are effectively a pointer to a snapshot of your changes. When you want to add a new feature or fix a bug—no matter how big or how small—you spawn a new branch to encapsulate your changes.

Git Branch

This makes it harder for unstable code to get merged into the main code base, and it gives you the chance to clean up your future's history before merging it into the main branch.

In a collaborative environment, it is common for several developers to share and work on the same source code. While some developers will be fixing bugs, others will be implementing new features, etc. With so much going on, there needs to be a system in place for managing different versions of the same code base. Branching allows each developer to branch out from the original code base and isolate their work from others. It also helps Git to easily merge versions later on !!

I too, learned about Git while studying and writing about this. Thankyou !!