During an incident, a new feature breaks checkout. Do you revert code or turn off a flag?
AdvancedScenarioBranching Strategies and Releases
Answer
Situation read → Both work, but they have different speed and risk.
What I'd do →
- If the feature is behind a flag, flip it off first. That takes seconds and needs no deploy.
- If not, revert the commit (
git revert), run a fast pipeline, and deploy the fix, or redeploy the previous artifact. - After recovery, write a postmortem: why wasn't it flagged, why did tests miss it.
- Reintroduce the change with a test and a flag.
Why → Mean time to recovery matters more than elegant fixes during an incident.
Interview tip → "Roll back first, debug later" is a mark of operational maturity.
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