Branch protection that doesn't slow you down
Branch protection rules can be a quiet productivity killer or a smart safety net. The difference is whether they enforce what actually matters.
Most engineering teams have branch protection rules that have grown over time: require X reviewers, require Y status checks, require linear history, require signed commits, require up-to-date branches. By rule 12, the rules are protecting you from your own configuration, not your own mistakes.
What's actually worth protecting
- Required passing tests — yes.
- At least one code review for non-trivial changes — yes.
- Required signed commits — usually no, unless you have a real reason.
- Required "up-to-date with main" — rarely worth the merge thrash.
The honest evaluation
Every rule costs time. Most rules don't catch the bug they were designed for, because the bug rarely repeats. Audit your branch protection rules annually. Remove the ones that haven't caught anything in 6 months.
Branch protection should defend against things that have actually gone wrong, not things that could in theory.