How do you support multiple released versions (1.x, 2.x, 3.x) without chaos?
AdvancedProductionBranching and workflow design
Answer
Keep main as the single place for new work, cut release/N.M branches when a version ships, and require every fix to land on main first and then be cherry-picked with -x to each supported branch. Automate the back-port with labels (backport release/2.x) using a bot or an Action so it is not a manual chore, and publish a support policy so nobody back-ports to dead versions. Tag each release from its branch, never from main.
git switch release/2.x
git cherry-pick -x <fix-sha>
git tag -s v2.4.1 -m "2.4.1" && git push origin release/2.x v2.4.1
More on Branching and workflow design
How would you choose a branching strategy for a team of 40 engineers shipping a SaaS product several times a day?IntermediateWhen is GitFlow still the right choice in 2026?IntermediateHow do feature flags change your merge and release process?IntermediateWhat branch naming and commit conventions do you enforce and how?BeginnerSquash, merge commit or rebase: what do you set as the allowed method on production repos and why?IntermediateDesign a branching and release process for a monorepo with 15 services deployed independently.Advanced