Repaso
Español
Maven, Git & SDLCIntermediateVCS-16

What is a typical difference between Git Flow and trunk-based development?

Options

  1. Git Flow has long-lived branches; trunk-based, short ones (Correct option)
  2. There is no difference between the two in practice
  3. Trunk-based has no branches and also no code review
  4. Git Flow requires no merges at all in the workflow

Answer

Git Flow uses many long-lived branches (develop, release, hotfix); trunk-based uses short-lived branches merged to main frequently, supported by feature flags and CI

Why

Git Flow: main (releases), develop (integration), plus feature, release and hotfix branches. Good for scheduled, versioned releases; heavier process and bigger merges.

Trunk-based development: everyone integrates into main very often (at least daily), with small short-lived branches or direct commits, protected by automated tests and feature flags for unfinished work. It fits continuous delivery.

Many teams use a lighter hybrid: feature branch, pull request, merge to main.

Remember

Git Flow = many long branches. Trunk-based = small, frequent merges to main.

Key terms

Practice this question in Repaso