Search code examples
version-controlbranch

When should you branch?


When working with a SCM system, when should you branch?


Solution

  • There are several uses for branching. One of the most common uses is for separating projects that once had a common code base. This is very useful to experiment with your code, without affecting the main trunk.

    In general, you would see two branch types:

    • Feature Branch: If a particular feature is disruptive enough that you don't want the entire development team to be affected in its early stages, you can create a branch on which to do this work.

    • Fixes Branch: While development continues on the main trunk, a fixes branch can be created to hold the fixes to the latest released version of the software.

    You may be interested in checking out the following article, which explains the principles of branching, and when to use them: