awesome-everything RU
↑ Back to the climb

Engineering Practice

Integration frequency is the lever

Crux Merge cost is set by how far trunk drifted since you forked, and drift compounds as everyone keeps committing. Integrating daily doesn''''t avoid conflicts — it keeps each one small enough to resolve in minutes with full context, before it becomes a big-bang nobody can review.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at middle altitude — in the sky
◷ 15 min

Two engineers fork the same OrderService on Monday. Alice ships a one-line fix Monday afternoon: her branch reconciles half a day of other people’s commits, merges in thirty seconds, done. Bob keeps his “checkout rewrite” on a branch for three weeks. On merge day, trunk has moved 600 commits under him — the validation helper he calls was renamed, the money type changed from cents-as-int to a Money class, a migration reshaped the table. His feature was finished in week two. The other week and a half is the integration tax, and he pays all of it at once.

Merge cost is a function of drift, not diff size

The intuitive model — “a big feature is hard to merge because it’s big” — is wrong in a way that matters. The cost of merging a branch is set by divergence: how far trunk has moved away from the point where you forked. A 2,000-line feature merged the same hour you started has near-zero merge cost, because trunk hasn’t moved. A 50-line fix merged after three weeks can be agony, because the 50 lines now sit on top of a foundation that was rebuilt underneath them.

Divergence compounds because integration is a shared system. While your branch is alive, every other engineer is also merging to trunk. A branch that lives one day reconciles one day of everyone else’s work. A branch that lives three weeks reconciles three weeks of it — and worse, you’ve lost the mental context for code that changed while you weren’t looking. The cost curve bends upward with branch age, not linearly. This is why Microsoft’s internal study found teams that went more than three days without integrating spent roughly 12× longer resolving conflicts than teams merging daily, and why merge-conflict work consumes an estimated 10–25% of developer time in branch-heavy shops.

Textual conflicts are the cheap ones

Git’s merge will flag a textual conflict when two branches edit the same lines — those are loud, and the tool stops you. The expensive failures are semantic conflicts: both sides apply cleanly, git is happy, and the code is now wrong. Alice renames validate(order) to validateOrder(order) and updates all 40 call sites on trunk. Bob’s branch added a 41st call site to the old name. Git merges both with zero conflict markers; the build breaks, or worse, it compiles because of an overload and silently does the wrong thing.

Semantic conflicts scale with the same drift variable. The more trunk changed while you were away, the more invisible assumptions your branch is built on have quietly become false. Frequent integration is the only cheap defense: a one-day-old branch can only have inherited one day of broken assumptions, and your CI gate catches them while the change that caused them is still fresh in someone’s memory.

Branch age at mergeTrunk drift to reconcileConflict characterWho still has context
HoursA few commitsTiny, mostly textualEveryone — it just happened
3+ daysDozens of commits~12× resolution timeFading
WeeksHundreds of commitsSemantic + textual, big-bangNobody — code changed under you

Frequency is the lever; tooling is a rounding error

Teams in merge pain reach for a better merge tool first. It’s the wrong knob. A smarter three-way diff lowers the cost of resolving a given conflict, but it cannot lower the conflict’s size — that’s fixed by how much trunk drifted, which is fixed by how long you waited. Three weeks of divergence is three weeks of divergence whether you resolve it in vim or in a fancy GUI. The lever that actually moves the cost is the one that controls drift: integrate more often.

This reframes “continuous integration” away from “we have a CI server.” CI is a practice — every developer merging small changes to the shared trunk at least daily — and the server is just the gate that makes the practice safe. The batch-size principle from lean shows up here exactly: small batches expose problems early and cheaply; large batches hide them until they detonate together. A daily merge is a small batch. A three-week branch is one enormous batch you can’t unship.

Why this works

“Integrate daily” sounds like a productivity nag, but it’s really a statement about feedback latency. Every hour your branch diverges from trunk is an hour of decisions you’re making on stale information — calling functions that no longer exist, assuming invariants that were just broken. Shrinking the branch lifetime shrinks the window in which you can be wrong without knowing it. That’s the whole game.

Pick the best fit

Your team's merges are consistently painful. A three-week branch just took two engineers a full day to land. What's the highest-leverage change?

Quiz

Why can a tiny 50-line change be harder to merge than a large change committed the same hour you forked?

Quiz

What makes a semantic conflict more dangerous than a textual one?

Order the steps

Order how merge cost compounds on a long-lived branch:

  1. 1 You fork from trunk; divergence is zero, merge would be free
  2. 2 Days pass; teammates merge dozens of commits to trunk
  3. 3 Code you depend on is renamed or has its invariants changed
  4. 4 Your branch now carries stale assumptions you can't see
  5. 5 Merge day: textual + semantic conflicts detonate together, nobody has context
Recall before you leave
  1. 01
    A colleague says 'big features are hard to merge because they're big.' Correct the model and explain what actually drives merge cost.
  2. 02
    Why is 'integrate daily' really a statement about feedback latency, and how do semantic conflicts fit in?
Recap

The cost of merging a branch is governed by drift — how far trunk has moved since you forked — not by how big your own change is. Drift compounds because integration is shared: every other engineer keeps committing while your branch lives, so a day-old branch reconciles a day of work and a three-week branch reconciles three weeks plus the context you’ve lost, which is why conflict-resolution time rises roughly 12× past three days and can eat a quarter of developer time. Textual conflicts are the cheap, loud ones; the expensive failures are semantic conflicts that merge cleanly and break silently, and they scale with the same drift. Better merge tooling lowers the effort per conflict but never the conflict’s size, so the only real lever is frequency: integrate to trunk at least daily, keep branches alive hours not weeks, and treat small batches as the mechanism that surfaces problems early instead of detonating them together. Continuous integration is that practice — the server is just the gate that makes it safe.

Connected lessons
Continue the climb ↑Short-lived branches vs gitflow
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources4
expand
  1. 01
  2. 02
  3. 03
  4. 04

Trademarks belong to their respective owners. Editorial reference only.