Contributor(s): Matthew Haughn

Branching is the practice of creating copies of programs or objects in development to work in parallel versions, retaining the original and working on the branch or making different changes to each. Each copy is considered a branch; the original program from which the branch is taken is referred to as the trunk, the baseline, the mainline or the master.

Branching is used in Version control and software management to maintain stability while isolated changes are made to code. Branching facilitates the development of bug fixes, the addition of new capabilities and the integration of new versions after they have been tested in isolation.

The practice makes it possible for different teams to work on separate elements of a program in tandem for greater efficiency. Copies of a version are made and each team works on its own copy. When multiple branches are in active development, the one that is set to become the next release is called the development branch.

Branching is related to but distinct from forking, which involves taking source code from an open source software program and developing an entirely new program from it. The new program is then known as a fork.

This was last updated in September 2016

Continue Reading About branching

Dig Deeper on Application Maintenance on Production Systems

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

Is branching still useful or does it problematize continuous integration too much?
I think that there's no way around it - sometimes you will need to create a branch. It can get messy when it's time to merge the branch back in, but sometimes it's necessary and just has to be done carefully. 
Branching itself might not be very troublesome if done carefully. But merging the branches always brings a lot of risks, like regression.