Interview Prep/Git & GitHub/Branching Strategies and Releases

You must support versions 3.8, 3.9 and 4.0 simultaneously. How do you handle fixes?

AdvancedScenarioBranching Strategies and Releases
Answer

Situation read → Each fix potentially lands in four lines, so process must be cheap and traceable.

What I'd do →

  1. Long-lived release/x.y branches, protected, receiving only fixes.
  2. Fix on main first. Label the PR with versions needing backport (backport-3.8).
  3. A bot (for example a GitHub Action) cherry-picks with -x and opens PRs per branch.
  4. Define an end-of-life policy and publish a support matrix.

Why → Label-driven automation turns backporting from a chore into review work.

Interview tip → Support windows are a product decision; push for a clear policy.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branching Strategies and Releases