Interview Prep/Git & GitHub/Branching and workflow design

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.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branching and workflow design