What single axis separates branching models, and why does it decide everything else?
answer
- One axis, not a catalogue of models
- How long work lives away from mainline
- Divergence compounds, it does not add
- Clean merge, incompatible behaviour
- Short lines need a releasable mainline
basics
~20 sBranching models differ mainly in how long a line of development lives away from the shared mainline before integrating. Everything else follows from that, because the cost of divergence grows faster than the line's age.
solid answer
~40 sCompare any two branching models and the real difference is **branch lifetime**: hours, days or months between a change leaving the shared mainline and returning to it. Short-lived lines mean everyone works against nearly the same code, so overlaps are small and drift is caught within a day. Long-lived parallel lines defer that pain and let it compound, because two lines can each merge cleanly and still be incompatible: the disagreement is not textual, it is two months of independent design decisions. The rest of a model follows from that one choice. A model that tolerates long-lived lines needs an integration phase, a stabilisation window and someone who owns reconciliation; a model that keeps lines short needs the shared line to stay releasable and a way to hide unfinished behaviour at run time.
code
pseudocode · 7 linesday 0 mainline: line A branches off
day 1 line A rejoins: 12 overlapping lines, resolved in 4 minutes
day 0 mainline: line B branches off
day 41 line B rejoins: 3 files overlap textually (one afternoon)
but the renewal-price rule was rewritten on both lines
result: the merge is clean, the behaviour is notgo deeper
Know that the difference between branching models is how long work stays away from the shared line, and that work waiting weeks to integrate is far harder to bring back than work waiting a day.
Explain the mechanics: why a textual merge can succeed while behaviour breaks, what an integration phase actually consists of, and what each end of the lifetime axis demands from the team's automated checks.
Show you have paid this cost. Be ready to describe diagnosing a painful integration as accumulated divergence rather than a tooling problem, and what you changed afterwards to shorten how long lines live.
Own the choice across teams: argue lifetime against release obligations, the number of supported versions and the maturity of automated verification, and name what you would stop doing in order to buy a shorter branch lifetime.
## The axis A branching model is usually presented as a diagram of named lines with rules about who merges into what. That presentation hides the only variable that matters. Take any two models, strip the names, and ask one question: **how long does a line of development live away from the shared mainline before its work is integrated?** Hours? A day? Six weeks? That number predicts almost everything else the model has to say. It predicts the overlap profile, the shape of the release process, what has to be automated, who has to own reconciliation, and what unfinished work does while it waits. It also predicts how the model fails when it fails. ## Divergence does not add up, it compounds Two changes that overlap for one day are reconciled by looking at a handful of lines. The same two changes overlapping for six weeks are a different kind of problem, for three separate reasons: - **Textual overlap grows.** More edits touching more files means more places where two histories both claim a region of the same file. - **Semantic drift grows faster.** A version-control merge reconciles text. It cannot see that one line renamed a concept the other line built on, or that both lines implemented the same rounding rule differently. That class of problem is invisible to the merge and surfaces only once both are integrated and the tests run. - **The number of pairs grows.** Divergence is not only between one line and the mainline; it is between every pair of open lines that will eventually meet. Four lines open for a week are six pairs to reconcile. This is why teams describe integration after a long divergence as an event rather than a step: an integration week, a stabilisation phase, a merge nobody wants to own. The work did not appear at merge time. It accumulated the whole time, unpriced, and merge time is when the bill arrives. A nine-engineer car-insurance renewals team on a six-week release cadence hit this exactly. A line of development kept alive for 41 days came back with only three files overlapping textually, and those took an afternoon. What took eleven days was that the renewal-price rule had been rewritten on both lines with different rounding at the boundary. Nothing conflicted. Everything disagreed. ## What each end of the axis demands | | Short-lived lines, continuous integration | Long-lived parallel lines | |---|---|---| | Typical lifetime | Hours to a day | Weeks to months | | Where unfinished work hides | Behind a runtime switch | On the line itself | | When you pay | A little, every day | Once, at integration | | Prerequisites | Fast, trusted automated checks; a mainline kept releasable | An integration phase, a stabilisation window, an owner for reconciliation | | Characteristic failure | A broken mainline blocks everyone at once | Design drift discovered late, near a release date | Neither column is virtue. The table is a price list. A team choosing the right column has decided which of those failures it can absorb and which prerequisites it can actually meet. ## The shapes have names, and the names matter less The recognisable models are points on this axis. A model with long-lived parallel release and development lines plus a formal integration path is commonly labelled Git Flow; the single-shared-line variant, where each short-lived change line goes straight back to the mainline after review, is commonly labelled GitHub Flow; **trunk-based development** is the name for driving the lifetime down to roughly a day. Recognise the labels, then argue about lifetime, because two teams following the same named diagram can sit six weeks apart on the axis that decides their pain. ## What integrated actually means One trap deserves naming. A change is not integrated because it was merged. It is integrated when the shared line, with that change in it, has been verified by the automated checks the team trusts. A merge that lands and then sits unverified for a day is divergence that has only changed hiding place. That is why the short end of the axis is impossible without fast, trustworthy verification: the model does not fail politely, it fails by putting an unverified mainline underneath everyone at once. ## Using the axis in an interview Do not answer with a diagram. Say what you are optimising, then place the team on the axis: how long lines live now, why they live that long, what would have to be true for them to live a day, and which of those things the team is missing. That answer works for a model you have never heard of, which is the point.
- Two long-lived lines each merge into the shared mainline without a single conflict, yet the result is broken. Why?Because a version-control system reconciles text, not meaning. Each line changed things in ways that are individually consistent and jointly wrong: a renamed concept, a rule implemented twice with different rounding, an assumption one side quietly removed. No merge algorithm can see that. Only the build and the tests catch it, and only after both lines are already in.
- In a model with long-lived parallel lines, where does the extra work actually go?Into an integration phase that is real work but rarely planned as such: a stabilisation window before release, someone who owns reconciling the lines, repeated re-merging as the mainline keeps moving, and defect-hunting on code that worked perfectly in isolation. The work does not disappear in a short-lifetime model. It is spread thinly across every day instead of concentrated where it is hardest to estimate.
- If divergence is so costly, why do some teams keep long-lived lines anyway?Because some obligations cannot be met on one line: several released versions supported in the field at once, a regulated freeze window, or software installed on equipment that customers cannot upgrade on demand. Those teams pay the divergence cost deliberately and bound it. Habit, or a wish to keep the shared line pristine, is not in that list.
Two people editing separate copies of the same plan: after an hour they reconcile edits in minutes; after two months they are not reconciling edits at all, they are reconciling two different plans.
saying these in an interview costs you the question
- Ranks branching models as good and bad rather than by fit
- Assumes a conflict-free merge means compatible behaviour
- Thinks integration pain grows in proportion to branch age
- Says short-lived lines mean exposing unfinished behaviour to users
- Treats integration as a phase rather than a daily activity