Most companies have too many active branches in their code repositories. “Active” meaning we’re doing actual development on them.

I had a client once that had over twenty different branches active at any given time for their customer facing application. They had a primary development branch and off that, they had a branch for each line of business, and off each of those, they had a branch for each team in that line of business, and off those, they had feature branches that individual developers would use for new development.

All day long, their most experienced developers would merge changes up and down through the repository. Every week, they had bugs in production that were a direct result of merge problems, where something had been broken or missed during the merge.

By the time we left, we’d taken them down to a total of three branches.

Production problems due to merges no longer happened. In fact, whole categories of delays and bugs had disappeared. Their most skilled developers were now helping to improve the codebase rather than wasting their time chasing merge issues. Features were being delivered faster because of all the delays and waste that had been cut out of the system, and everyone was generally happier because we’d simplified so much of the process.

While this is an extreme example, reducing the number of active branches is activity I’ve assisted with at many clients and the results are always beneficial.

There are legitimate cases where adding a new branch will help, however branches are massively overused across the industry, and more often than not, they introduce, rather than solve problems.