Should Agile Teams Minimize Branching? | TechWell

Should Agile Teams Minimize Branching?

Software version management tools provide many mechanisms that support collaboration, identification, and version management, all of which are part of the definition of software configuration management (SCM). How you use your version management tools characterizes your patterns of work. Given all that, developers are most interested in whether or not an SCM tool is capable of branching.

Branching allows more than one related stream of code to evolve in parallel. Creating a release-line branch at the end of a release is one of the more common branching patterns. Another use of branching is to allow teams and team members to work in parallel more easily; distributed version management tools like Git can help you achieve this.

While allowing for more parallel work sounds like it would enable you to be more agile, branching adds overhead. Because of the cost of branching, I and others have advocated that agile teams follow practices that support frequent commits to a single codeline along with testing, especially given the current state of tools.

I’ve thought of both philosophical and practical reasons why minimizing branching is the best approach for agile teams. The philosophical one is that branching defers integration, and a central theme of agile coding is a codebase that always works. There are ways to work that address that, but those ways add overhead. The overhead is related to the practical issue, which is the state of tools.

Tools are getting better. As my colleague Joe Farah discussed in an interview on CMCrossroads, SCM tools are beginning to be better at supporting agile workflows. But the biggest challenge with branching in order to allow parallel work toward a deliverable is that merging isn’t always easy.

Most SCM tools deal with code mostly as files with text, and since they are unable to understand a developer's intent, a conceptually simple change, like extracting an interface, might require a fair amount of review when two people make changes. In all but the most simple situations, working on the same codeline with frequent commits might be faster in the end.

One of the more intriguing developments involves tools that treat code at a higher level than text. There has been much research on refactoring-aware SCM tools. Recently Codice Software introduced a semantic merge tool that works not only with its Plastic SCM product but also with other tools it can integrate with. As SCM tools treat code changes in a more conceptual way while capturing developers' intentions, branching and merging can become less costly and more useful to an agile team.

Once these structure-aware SCM tools are pervasive, branching might be a more useful tool for agile teams. But even as the overhead of tools becomes minimal, it will be important to remember that agile methods value tools less than individuals, interactions, and working code. Testing and continuous integration are still essential for agile teams to deliver reliably.

Up Next

About the Author

TechWell Insights To Go

(* Required fields)

Get the latest stories delivered to your inbox every week.