A release is two days away and the team wants a code freeze. How do you enforce it technically?
IntermediateScenarioBranching Strategies and Releases
Answer
Situation read → Social agreements get violated under pressure.
What I'd do →
- Branch
release/x.yand apply stricter protection: two approvals, release-manager-only merges. - Leave
mainopen for next-cycle work. - For a full freeze of
main, temporarily tighten the ruleset (restrict who can push or merge) and lift it afterward. - Document the exception process for critical fixes.
Why → A release branch avoids freezing the whole team.
Interview tip → Prefer "release branch freeze" to "everyone stops".
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