Pull request
What it is
A pull request (PR) is a formal proposal to merge a set of changes from one branch into another. It bundles the diff, a description, and a review conversation, and is the primary mechanism for code review before changes land on the main branch.
Why it exists
PRs make integration a deliberate, reviewed, and recorded step rather than an invisible push. They are the place where quality gates (human review, automated checks) are enforced before code enters the shared line.
Key ideas
- Source branch → target branch — a PR is reviewed and merged into the target (usually main/develop).
- Reviewers — teammates approve or request changes; required reviewers can be enforced by branch policies.
- Automated checks — CI builds, tests, and static analysis run against the PR branch; a PR can be blocked until checks pass.
- Merge options — merge commit, squash (collapse to one commit), rebase, or fast-forward.
- Branch policies — e.g. “minimum 1 approval”, “no direct pushes to main”, “build validation required” — these turn PR review from convention into enforcement.
Exam notes
- PRs are central to code review and to protecting the main branch from bad merges.
- Branch policies + required reviewers + build validation = the enforcement layer for review.
- Squash merging keeps history clean; it is a common enterprise default.
- Same idea in GitHub (pull request) and Azure Repos (pull request); both support the same review workflow.
Related
git · branching-strategy · merge-conflict · azure-repos · github
📘 Source: Microsoft Learn — Pull Request