Pull requests and code review

Learning objectives: use pull requests to review and merge code safely, and enforce quality through branch policies and required checks.

Overview

The collaboration layer of Git: PRs bundle a diff, discussion, and approvals; branch policies turn “please review” into a mandatory gate protecting the main branch.

Units

  • Creating and reviewing pull requests
  • Branch policies (required reviewers, build validation, no direct push)
  • Merge strategies (merge, squash, rebase)

Key terms & commands

PR · reviewer · approval · branch policy · build validation · squash merge · rebase merge

Hands-on

Open a PR in Azure Repos or GitHub, add a reviewer, require a check to pass, and merge.

Exam focus

PRs are the code-review gate; branch policies enforce review automatically; squash keeps history clean.

Path MOC · get-started-with-git · branching-strategies