Git history strategies for developers and operators

Almost every software project today is using git as its version control system. While using git is fairly simple, meeting the needs of developers and operators at once requires a lot of discipline and careful planning of workflows.

The developer/operator boundary

A git repository represents a software project's state from multiple perspectives. For developers, it retains a step-by-step history of changes made to the source code and an audit of who made what change when. For operators, no matter if Admins, DevOps, QA or SRE roles, instead view the project as a set of features or versions to produce deployable artifacts from. Their view of the project is preferably an incremental list of "previous version + feature X" to easily know what current and prior versions exist, which can be used for rollbacks or A/B tests.

This boundary will persist within the same repository no matter what exact role takes responsibility of the project code after development, and regardless of chosen language, CI pipelines and deployment strategy.

Single dev branch with tags

Easy development, but limited deployment flexibility.


The simplest model is likely a single main branch for development history combined with git tags for specific commits to mark deployable versions (part of common git workflows like git flow or github flow). The main branch is the single source of truth across team boundaries and requires virtually no overhead on the developer side.

While simple, this model can be very noisy in reality, as dev/ops concerns conflict within the same git history. In case operators need to temporarily disable a feature out of order (keep previous 2 features but disable 3rd most recently added), the only real way is git revert, pushing a new commit into developer history that has nothing to do with their work. On the other hand, operators also have to navigate a history with changes that do not concern them like code refactors, partial feature commits and internal api changes.

This type of git setup is best for small teams where only a handful of people interact with the source code and everybody fully understands and follows the source code, often startups where developers are deploying artifacts themselves.

Separate ops and dev branches

Easy development and clean deployments, but much more complex release merging.


To better isolate operator and developer requirements, git repositories can split project state into separate branches for development and deployment. The development branch still accumulates the full history of software changes, but features are only merged into the production branch once complete, often using a squash merge to turn many incremental development commits into a single commit containing a brief changelog of what was added/changed in this new software version.

This gives operators a much cleaner view of deployable artifacts and if they need to temporarily disable a feature, they can use git revert or cherry pick a patch from development into their branch without directly interfering with the development branch. This decoupling is not permanent though, as any divergence between main and production branches will result in conflicts that need to be resolved when the next feature/version is ready to release. As a practical limitation, this means the production branch needs to resolve any divergence from main before a new feature can be merged cleanly. Leaving a feature temporarily disabled while adding a new one requires deployment code changes (change incoming history from main or add feature flags) or risks quietly re-applying a previously disabled feature.

Single dev branch with feature flags

Extremely high deployment flexibility, but much more work for developers.


A more modern workflow drops the idea of separate branches again and instead makes ops concerns part of the development team's problem. When software developers create a new feature or change an existing one, they retain the old logic and add a runtime or build variable to switch between them. Operators can use feature flags to easily enable/disable features as needed without changing git history at all, but developers have to deal with massively increased overhead from larger cognitive load during development (larger codebase, multiple logic states at once) and related work (unit tests, documentation).

This workflow also requires much more synchronization across development and operator teams to communicate what flags exist, when each is ready to use and at what point a flag and attached logic can be removed from the codebase.

This is often combined with trunk-based development to keep a very linear/flat git history graph and works great in environments that are ops-heavy (continuous delivery, very frequent tiny deployments), but falls apart when development cannot be split into isolated features (database schema/data migrations, multiple dependency versions etc).

Picking the right approach

Choosing a way to manage the developer and operations boundary depends on your organizational structure, the software it develops and how you intend to manage deployments.

Small companies with development teams that either self-deploy or have a DevOps engineer to translate between developers and administrators often benefit from a single git dev branch with tagged releases.

If developing and running the application are two separate teams, and you want to stick with git/github style workflows during development, separate dev/prod branches and a git maintainer responsible for managing merges/conflicts between them is often the right way to go.

Large-scale deployments that want to decouple deployments from feature availability will eventually arrive at trunk-based development with runtime feature flags to allow very frequent tiny deployments. Runtime feature flags support enabling/disabling features without changing the deployed artifact, for example to run A/B tests on only a small portion of production traffic. This increase in deployment flexibility comes at the cost of slower development, as it causes much more overhead on the developer side.

More articles

Converting physical and virtual machines to incus instances

Including same-host VM to container conversion

Survival guide for troubleshooting degraded linux server performance

How to diagnose and resolve server outages or service degradation

Git development strategies

Git history management for common project lifecycles