Interview Prep/Git & GitHub/Branch protection, rulesets, CODEOWNERS and review at scale

What branch protection settings do you enable on `main` by default?

BeginnerProductionBranch protection, rulesets, CODEOWNERS and review at scale
Answer

Require a PR with at least one approval, dismiss stale approvals on new commits, require status checks to pass (and branches up to date or use merge queue), require conversation resolution, require linear history if we squash, block force pushes and deletions, and apply the rules to admins too. Code owner review is added on sensitive paths.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branch protection, rulesets, CODEOWNERS and review at scale