Branching to Distraction

Branching as a Gateway to Agility

Even though branching has downsides when you have processes in place to enable frequent delivery, there are situations where branching can provide you the space you need to develop agile practices.

Keeping a legacy release on a branch while you refactor the main line to be more testable allows you to focus effort on making code better while at the same time minimizing the cost of changes to the delivered code. The costs of working on the branch could be more than made up by the reduced support costs for future releases.

Some of these changes are organizational, and organizational change can be difficult and slow. If you want to move towards a more agile code line at a team level, there are some steps that you can take:

  • Branch only when, on net, the branch minimizes distraction and effort rather than increases it. Use the cost analysis to make a case for the organizational changes you need to establish a more frequent release model.
  • Consider the need to branch as an indication that your code may not be as agile as you need it to be.
  • Remember that tools that make the mechanics of branching easy can be helpful, but understand the reason (and cost) before deciding to branch.
  • Weigh the cost of a more frequent delivery against the cost of maintaining multiple branches, and don’t assume that a branch is less costly.
  • When you do branch, keep branches short lived and integrate changes between branches frequently.
  • Increase your automated test coverage so that you can improve your confidence in your ability to deliver code from the main line.
  • Consider applying the patterns in Software Configuration Management Patterns that discusses how to develop using a minimalist branching model.

About the author

Steve Berczuk's picture
Steve Berczuk

Steve Berczuk is an engineer and ScrumMaster at Humedica where he's helping to build next-generation SaaS-based clinical informatics applications. The author of Software Configuration Management Patterns: Effective Teamwork, Practical Integration, he is a recognized expert in software configuration management and agile software development. Steve is passionate about helping teams work effectively to produce quality software. He has an M.S. in operations research from Stanford University and an S.B. in Electrical Engineering from MIT, and is a certified, practicing ScrumMaster. Contact Steve at steve@berczuk.com or visit berczuk.com and follow his blog at blog.berczuk.com.