Release branches (`release/*`) need stricter rules than feature branches.
IntermediateScenarioProtection, Hooks and Policy
Answer
Situation read → One ruleset per branch is tedious; patterns solve it.
What I'd do →
- Ruleset targeting
refs/heads/release/*. - Require 2 approvals, code owner review, and the full test workflow.
- Restrict who can push or merge to the release managers team.
- Block deletion and force pushes.
Why → Patterns apply automatically to every new release branch, so nobody forgets to protect it.
Interview tip → Test with "evaluate" mode before enforcing.
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".IntermediateProduction is down and the fix needs to merge now, but approvals are required.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?Intermediate