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 →
- Long-lived
release/x.ybranches, protected, receiving only fixes. - Fix on
mainfirst. Label the PR with versions needing backport (backport-3.8). - A bot (for example a GitHub Action) cherry-picks with
-xand opens PRs per branch. - 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.
More on Branching Strategies and Releases
An eight-person team deploys several times a day. Which branching strategy do you recommend?IntermediateWhen would you choose GitFlow over trunk-based development?IntermediateIn trunk-based development, a feature will take three weeks. How do you merge it daily without exposing it?IntermediateYou are cutting a release. How do you manage the release branch and late fixes?IntermediateShould releases use lightweight or annotated tags?BeginnerA release tag was placed on the wrong commit and has been published. What do you do?Intermediate