thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

DevOps & Automation · Foundational

Branch Protection Rule

Repository settings that enforce policies on important branches, such as required reviews, status checks, and no force pushes.

Definition

On GitHub, branch protection rules and newer repository rulesets can require pull requests, approving reviews, passing checks, signed commits, linear history, and restrict who can push. Azure Repos uses branch policies.

Example

main requires one approval, passing CI, and blocks force pushes and deletion.

Exam tip

To ensure CI must pass before merge, configure required status checks in branch protection or rulesets.

Related terms