BrainyBeeBrainyBee
ExploreBlogStart Studying
HomeDesigning and Implementing Microsoft DevOps Solutions (AZ-400)Branch merging restrictions
Lesson255 words

Branch merging restrictions

Implement branch merging restrictions

Restricting who and what

RestrictionEffect
Require a pull requestNo direct pushes to the branch
Restrict who can pushOnly named people, teams or apps may merge
Require status checks to passMerge blocked until checks are green
Require branches to be up to dateMust rebuild against the latest target first
Include administratorsThe rules apply to admins too

The two that get missed

Include administrators. A protection rule that exempts administrators protects the branch from everyone except the people most able to break it in a hurry — usually during an incident, which is exactly when the safeguards matter most. If a break-glass path is genuinely needed, make it explicit and audited rather than an implicit exemption.

Require branches to be up to date. Without it, two pull requests can each pass all checks against an older main and produce a broken main when both merge. Neither change is individually at fault; the combination was never tested. Requiring an up-to-date branch forces revalidation against what is actually there — at the cost of rebuilding when the target moves.

Force pushes and deletion

Blocking force pushes and branch deletion on protected branches prevents history from being rewritten under everyone else. On a shared branch a force push does not merely lose commits — it invalidates every clone that already fetched.

Primary sources

  • https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies
  • https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches
All Designing and Implementing Microsoft DevOps Solutions (AZ-400) Study Resources

Related Notes

  • Agent and runner infrastructure421 words
  • Agent and runner infrastructure — quick notes150 words
  • Alerting on pipeline events255 words
  • Alerting on pipeline events — quick notes94 words
  • Analyzing usage and application performance241 words
  • Analyzing usage and application performance — quick notes73 words
  • Appropriate access levels217 words
  • Appropriate access levels — quick notes85 words
  • Automating container scanning277 words
  • Automating container scanning — quick notes96 words
  • Automating documentation from Git history191 words
  • Automating documentation from Git history — quick notes55 words

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up.

Start Studying

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free
Designing and Implementing Microsoft DevOps Solutions (AZ-400) ResourcesExplore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.