Production is down and the fix needs to merge now, but approvals are required.
IntermediateScenarioProtection, Hooks and Policy
Answer
Situation read → You need an emergency path that is fast but auditable.
What I'd do →
- Pre-define a break-glass process: a small group on the ruleset bypass list ("pull requests only" bypass preferred over full bypass).
- Open the PR anyway, get a verbal or chat approval from the incident commander, then merge with bypass.
- Record the reason in the PR and the incident ticket.
- Review every bypass afterward in the audit log.
Why → Bypass should be rare, visible and reviewed.
Interview tip → Say you would rather make the normal path faster than live on bypasses.
More on Protection, Hooks and Policy
You are asked to protect `main`. Which rules do you turn on?BeginnerClassic branch protection or repository rulesets: which do you use?IntermediateA required status check never reports and the PR is stuck as "Expected — Waiting for status".IntermediateYou want to stop developers from committing obvious mistakes like debug prints, trailing whitespace or secrets.BeginnerHooks in `.git/hooks` are not shared with the team. How do you distribute them?IntermediateA developer bypasses your hook with `git commit --no-verify`. How do you enforce the rule anyway?Intermediate