SteelReed

Search

Search posts, questions…

DevOps & CloudQuestion 7 / 35

Middle

Git Flow or trunk-based development? How do you pick a branching strategy for a team?

Short answer

Trunk-based: merge short branches (a few hours to 1–2 days) into main, main is always deployable, unfinished work hides behind feature flags. Git Flow (develop, release/*, hotfix/*) only fits when you must maintain several versions in parallel.

yes: library, mobile appno: web serviceSeveral versionsmaintained in parallel?Git FlowTrunk-based / GitHub FlowShort PR + required CImain always deployableUnfinished work behind flag

3 points to say:

  1. Trunk-based: branches live hours to days, conflicts are small and frequent, releases flow continuously from main.
  2. It needs fast CI, branch protection, quarantined flaky tests; there is still PR review, no direct pushes.
  3. Git Flow when you maintain several released versions; Conventional Commits enable automatic changelogs and versioning.

Keep reading the deep dive

Create a free account to read the full explanation and follow-up questions, mark questions as studied and review them on a schedule.