Interview Prep/Git & GitHub/Branching strategies, pull requests and code review

Why can long-lived branches be harmful and how do you mitigate?

AdvancedConceptBranching strategies, pull requests and code review
Answer

Divergence grows, so merges become large, conflicts costly and integration bugs surface late. Mitigate by merging main into the branch often (or rebasing), shipping behind feature flags, branching by abstraction, and breaking work into independently mergeable slices.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branching strategies, pull requests and code review