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.






