← All posts
Software Methodologies & Delivery

Trunk-Based Development Is Table Stakes in 2026 — Here's How to Adopt It

Short-lived branches, feature flags, CI hygiene. How to migrate from long-lived branches and why it matters for shipping velocity.

Craig Hoffmeyer8 min read

Trunk-Based Development Is Table Stakes in 2026 — Here's How to Adopt It

Three months ago, I joined a 12-person engineering team that was still merging long-lived feature branches into main. Their average merge took 4 days to resolve conflicts. Code review was a bottleneck. Deployment was a release event, not a cadence.

They were losing weeks to process every quarter.

Trunk-based development (TBD) is not new. Git Flow made sense in 2010 when we didn't have feature flags or good CI systems. But we do now. And if you're not on trunk, you're operating with a self-imposed shipping tax that compounds every month.

This is the post I wish I'd had four years ago when I started seeing this pattern everywhere.

Why Trunk-Based Development Matters

Short version: long-lived branches kill velocity and hide problems.

Long version:

When you work on a feature branch for two weeks, you're not integrating with main. You're working in isolation. The codebase is changing around you. Teammates ship breaking changes, refactors, database migrations. On day 14, you merge and spend 8 hours in conflict hell. You discover that your feature doesn't actually work in main because a teammate refactored the API you depend on.

You fix it. You redeploy. You lose two days.

Trunk-based development flips this: integrate to main every day. Small commits. Rapid feedback. If something's wrong, you find out in hours, not weeks.

The second-order effect: trunk-based development forces you to use feature flags. You can't ship partially-finished work to production. So you ship it behind a flag, test it, and roll it out. This is a forcing function that makes you ship more often, get feedback faster, and recover faster when something breaks.

The third-order effect: your CI system becomes critical. You're merging to main constantly. If your CI is slow or flaky, trunk-based development becomes painful. But that forces you to fix your CI, which is always worth doing anyway.

The Core Pattern

Here's what trunk-based development looks like in practice:

Branches are short-lived. 1–3 days, not 1–3 weeks. A feature branch for something big? Scope it into bite-sized commits that can land in main within 48 hours.

You merge to main every day. Not push to a "develop" branch that merges to main eventually. Directly to main. This sounds chaotic; it's actually safer because you catch integration issues immediately.

Feature flags hide unfinished work. If your feature isn't ready for users, ship it behind a flag. Rollout is a separate action from deployment. This decouples "ship code" from "ship feature," which is where velocity actually comes from.

Code review is synchronous and quick. If branches are 1–2 days old, there's <500 lines of code to review. It takes 30 minutes, not a day. Conflicts are minimal. Merge time is seconds.

CI has to be good. If you're merging to main 50 times a day, CI can't be flaky. It has to run in <10 minutes. This forces discipline on test coverage and build time, which helps everything else.

Main is deployable. Not at some future point. Right now. Any commit on main should be live-able to production. If it's not, you have a discipline problem that TBD will expose quickly.

A Concrete Example: The Migration I Just Finished

The team I mentioned above was using Git Flow with feature branches, develop branches, and release branches. It was textbook. It was also killing them.

Here's what we did:

Week 1: Audit and planning. We found that their average cycle time from commit to main was 18 days. Their main branch wasn't always deployable—there were broken tests and infrastructure debt. Their CI took 22 minutes.

Week 2: CI first. We parallelized tests, removed flaky tests, optimized the build. Got it down to 6 minutes. We fixed the broken tests on main. We made it a policy: main must be green and deployable.

Week 3: Feature flags. We added a simple feature flag system (we used a homegrown Redis + environment config solution, but LaunchDarkly, Unleash, or PostHog work too). Engineers started shipping behind flags.

Week 4: Small batches. We changed the way we groomed work. Instead of two-week epics, we broke work into "one-day" and "two-day" chunks. A two-day chunk is: scope it, build it, test it, flag it, land it in main. Done.

Week 5+: Operational rhythm. Daily standup becomes purely about unblocking. Async PRs, synchronous pairing when someone's stuck. They started deploying to production 5–7 times a week instead of once every 10 days.

By month two, their cycle time had dropped from 18 days to 2 days. Their deployment frequency went from 1x per 10 days to 5–7x per week. Defect rate was flat (the flags and smaller batches meant faster rollback, not more bugs).

They'll never go back to Git Flow.

The Counterpoint: When TBD Gets Messy

Trunk-based development isn't free. I've seen it go sideways:

If your CI is broken or slow, TBD becomes a pain. You're merging to a branch you can't trust. You start creating more branches to work in isolation, and boom, you're back to long-lived branches.

If you don't have feature flags, you ship half-finished work to users. This is bad. You have to build flag infrastructure first.

If your team doesn't communicate, you'll have conflicts and broken builds. TBD requires more async communication (PR comments, commit messages, docs), not less.

If your database migrations are scary, TBD forces you to do them right (backward-compatible, incremental). If you haven't, this hurts. But it hurts in a way that forces you to build the discipline.

The common thread: TBD isn't magic. It's a forcing function. It exposes problems. If you try it and it hurts, the problem isn't TBD. It's something TBD is making visible.

The Migration Path

If you're on Git Flow or long-lived feature branches, here's how to move:

Phase 1: Make main deployable. Fix broken tests. Stabilize CI. Get to a state where main is always green. This might take 2–4 weeks depending on debt.

Phase 2: Add feature flags. Pick a lightweight system. Don't over-engineer it. (For most startups, even a simple environment variable + config file works initially.)

Phase 3: Start with one team. Don't flip the entire org at once. Pick your fastest, most disciplined team. Let them go trunk-based for two weeks. Show the velocity gain. Let others ask for it.

Phase 4: Pair the old way with the new way for two weeks. Feature branches go to a "staging" branch for two weeks while your team learns trunk-based. You can still deploy from staging while engineers get comfortable with the daily merge rhythm.

Phase 5: Full switch. No more long-lived branches. Main is the source of truth.

Most of this transition takes 4–8 weeks for a 5–10 person team. Larger teams take longer, but the payoff is worth it.

Where I Come In

I've migrated teams from Git Flow to trunk-based development five times. Each one has gained 40–60% in deployment frequency and cut cycle time by 60–70%. I know the stumbles: where CI breaks, which feature flag library makes sense for your scale, how to unblock teams that get religious about branch protection rules.

If you're losing shipping velocity to long-lived branches, or if you've tried TBD and it's messy, I can audit your pipeline and build a migration plan.

Let's talk about it.

Action Checklist

  • Check your current merge frequency. How many PRs merge to main per week? If it's <5, you're probably on long-lived branches.
  • Measure cycle time: from first commit to merge in main. If it's >5 days, you have a branch age problem.
  • Audit your CI: runtime, flakiness, coverage. If it takes >15 minutes or fails randomly, fix that before moving to TBD.
  • Add feature flags to one feature. Ship it behind a flag. See how it feels.
  • Pick your boldest team. Run a two-week trunk-based development pilot. Measure cycle time and deployment frequency. Compare to main team velocity.
  • If the pilot works, schedule the full migration.

Related Reading

Let's audit your deployment pipeline

Get in touch →