Architecture Decision Record: Branching Strategies

Last Modified: April 3, 2024

Authors: Matt DeKrey

Context and Problem Statement

As a consulting company, we need a recommendation for a branching strategy, or a go-to when we start new projects. Many clients likely already have their own strategy in place, but Principle often works faster and differently than the teams embedded within their own company.

Each client has different restrictions, from SOX compliance, CI/CD rules, SDLC requirements, etc. We want a branching strategy that developers can get used to and use across most projects.

Some requirements for clients, in no particular order:

Considered Options

Decision Outcome

For most clients, the chosen option is the Scalable Git Branching Model, because it can scale down to a small size to support fast-moving teams and also scale up to handle more complex teams.

The largest drawback is onboarding and complexity; this has been mitigated with documentation and tooling.

This can always be superceded by client decisions.

Pros and Cons of the Options

Git Flow

The original Git Flow definition article was updated in March of 2020, saying:

Web apps are … not the class of software that I had in mind when I wrote the blog post 10 years ago. If your team is doing continuous delivery of software, I would suggest to adopt a much simpler workflow.

GitHub Flow

GitHub Flow documentation

Trunk based

Trunk-based Development. See also Atlassian’s Trunk-based Development recommendations

Scalable Git Branching Model

Scalable Git Branching Model (dark mode). See also the breakdown of scalable options.

Using rebase merges

Using rebase merges, while not a fully-fleshed-out strategy on its own, can be applied to a number of the other branching models; it can be applied to trunk-based development quite easily, for instance. However, there are very rarely any published models that wholly rely on rebase merging, and those that do appear to have many of the same constraints. (citation needed)

Additional References