Long-Lived Branch
ELI5 - The Vibe Check
A long-lived branch is the feature branch that was supposed to take three days and is now somehow eight weeks old, quietly drifting further from main every single day it isn't merged. By week three, merging it back feels less like integrating a feature and more like performing surgery, because main has changed underneath it in a hundred small ways nobody tracked.
Real Talk
A long-lived branch is a branch that remains unmerged for an extended period, accumulating divergence from its base branch as both continue to receive independent commits, which increases the size and risk of the eventual merge conflict and the odds of semantic conflicts that never show up as textual conflicts. It is the primary pain point that trunk-based development and feature flags are designed to eliminate, by favoring small, frequent merges over big, deferred ones.
When You'll Hear This
"That refactor branch is two months old now, it's basically a long-lived branch at this point." / "We killed long-lived branches by putting everything behind a feature flag instead."
Related Terms
Feature Flag
A feature flag is a toggle that lets you turn features on or off without deploying new code.
Merge
Merge is like combining two parallel universes back into one. You take the changes from your branch and smoosh them into another branch.
Semantic Conflict
A semantic conflict is the scariest kind of merge because git doesn't even notice it.
Trunk-Based Development
Instead of giant feature branches that live for 3 weeks and cause merge hell, trunk-based development has everyone commit to main every day.