Pull request

What it is

A pull request (PR) asks to merge changes from one Git branch into another, usually a feature branch into main. It gathers the proposed file changes, explanation, discussion, reviewers, and automated results in one reviewable place.

Why it exists

Without a PR, a change can reach a shared branch without a clear review record. A PR makes integration deliberate: people can ask questions, automated checks can validate the proposed change, and the repository can enforce required conditions before completion.

Key ideas

  • Source branch → target branch describes the direction. A PR does not change the target branch until it is completed.
  • Reviewers provide human judgment. They can comment, approve, or request changes. Required reviewers are enforced only when the target branch’s policy requires them.
  • Checks provide automated evidence. A CI build, test suite, security scan, or external status check can run for the proposed change. A green check means that check passed—not that the change is automatically safe.
  • Merge strategy is a team choice. Merge commit, squash, rebase, and fast-forward preserve history differently. Choose and enforce a strategy that suits how the team investigates and reverts changes.
  • Policies apply to the target branch. In Azure Repos, policies can require a PR, approvals, linked work items, resolved comments, build validation, status checks, or particular merge types.

Northwind example

Luis opens a PR from feature/delivery-fee into Northwind’s main branch. The PR explains the pricing change, links the work item, and runs unit tests. Maya reviews the calculation and asks Luis to cover an edge case. After he updates the branch, the policy resets the review vote, the build runs again, and the required reviewers approve. Only then can the PR complete into main.

Exam notes

  • PR = proposed branch change plus review and validation evidence.
  • Branch policies enforce conditions on their target branch; a PR alone does not guarantee review.
  • Different merge strategies preserve different history; use the repository’s policy.

git · branching-strategy · merge-conflict · azure-repos · github

📘 Source: Microsoft Learn — Pull Request