Branching

Branching

What is Branching ?

Branching is a technique used by development teams so that different teams can work parallelly in a more efficient way without impacting each other’s work. Multiple copies of the code or program are made so that the original could be retained, and the branches are changed according to the requirements. 

Branching

What is a trunk? 

The original program is called the trunk. The copies are taken from the base program, also called mainline, master, or baseline. Usually, branches is done by a version control software, VCS, which can segregate “in progress” code from the tested stable code. 

What is merging? 

While branching helps teams to work in parallel, the codes are always related to the trunk (baseline). Therefore, when there are multiple teams working simultaneously and some on the baseline itself, the changes in the trunk should be reflected , otherwise resulting in complexity and conflict. Therefore, merging is done in regular intervals so that the changes in the baseline are reflected in the branches. Merging early often makes sure that there is minimal conflict and is therefore stated as a “best practice.” 

What are the different branching strategies? 

Feature branching 

The code is divided into branches based on the features or “user stories.” They are also referred to as tasks. Feature branching allows the development teams to segment and work on sections of the code and have releases that can be tested and reviewed separately rather than facing an entire release. However, a problem with feature branching is that at times developers might work in isolation for prolonged periods of time, resulting in long-lived branches which are extremely difficult to integrate into the base code. 

Release branching 

Release branching is a strategy that involves creating a branch for all potential tasks/ features, during a release. Is best suited for teams that working on multiple releases and patch versions in the long run. They can work on multiple features of the same trunk during a release. A major release may use feature while minor patches are modified directly in the release branch. The disadvantage is that code becomes vulnerable to instability when there are multiple releases changes and contributors. 

What are the advantages of ? 

There are multiple benefits, Some of them are: 

· It allows multiple teams to work simultaneously, allowing faster delivery. 

· Quick feedback: The developers obtain feedback faster helping them to work more efficiently. 

· It is better suited for planned and structured releases. 

· It facilitates better collaboration among teams working on the same base code. 

To start a Free trial Click here or Book a demo to chat with us now click here

Share