Interview Prep/Git & GitHub/Branching Strategies and Releases

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 →

  1. If the feature is behind a flag, flip it off first. That takes seconds and needs no deploy.
  2. If not, revert the commit (git revert), run a fast pipeline, and deploy the fix, or redeploy the previous artifact.
  3. After recovery, write a postmortem: why wasn't it flagged, why did tests miss it.
  4. 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.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branching Strategies and Releases