Interview Prep/Git & GitHub/Branching Strategies and Releases

When would you choose GitFlow over trunk-based development?

IntermediateScenarioBranching Strategies and Releases
Answer

Situation read → The right model depends on how software is shipped.

What I'd do →

  1. GitFlow fits scheduled releases and several supported versions: mobile apps, on-prem or packaged software.
  2. Trunk-based fits SaaS with continuous deployment.
  3. If we adopt GitFlow, keep it light: main, develop, short release/* and hotfix/* branches, and skip long feature branches.
  4. Automate merge-back from release and hotfix branches to avoid divergence.

Why → GitFlow's overhead pays off only when you must maintain parallel release lines.

Interview tip → Show you know the author of GitFlow himself said it is a poor fit for continuously delivered web apps.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branching Strategies and Releases