How do you keep long-running feature work from diverging without long-lived branches?
IntermediateProductionBranching and workflow design
Answer
Slice the work: land the refactor first, add the new code path behind a flag, migrate callers, then remove the old path. Use branch by abstraction for internals and expand-and-contract for schemas. If a branch must live a week or more, merge main in daily and keep a draft PR open so CI proves compatibility every day.
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 you support multiple released versions (1.x, 2.x, 3.x) without chaos?AdvancedHow 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?Intermediate