Skip to content

Branch strategies

Trunk-based development is the modern default: short-lived feature branches, frequent merges to main, no long-running release branches.

Branching without fear

  1. Trunk-based by default

    Short-lived feature branches (hours to days), merged to main daily. Long-lived branches diverge forever.

  2. One branch per concern

    fix/payment-retry, not my-work. A branch is a name for a change, not a name for a developer.

  3. Delete after merge

    A merged branch is noise. Delete it; the commits survive in the target.

  4. Release branches for hotfixes

    release/v1.2 lets you patch production without merging unready features from main.

  5. Feature flags before branches

    If the change is huge, use a feature flag instead of a long-lived branch. Flags merge continuously.