Contents

Engineering Craft › Pull Requests & Code Review

Pull Request

A proposal to merge a branch, with discussion and review.

Also known as: PR, pull requests, merge request, MR

A pull request (PR) is a request to merge your branch into another one, usually main. It’s a page on GitHub (GitLab calls it a merge request) showing your changes, a place to discuss them and the gate where checks and reviews happen before code lands.

The flow

git switch -c fix-login-redirect
# ...edit, commit...
git push -u origin fix-login-redirect

Then open a PR from that branch. The host shows the diff, runs automated checks (tests, linters) and notifies reviewers.

  1. Open it, with a clear title and description.
  2. Review: teammates comment; you answer and push more commits (the PR updates itself).
  3. Approve: reviewers sign off once checks pass.
  4. Merge: using the team’s merge strategy.
  5. Clean up: delete the branch.

What makes a good one

  • Small and focused. One purpose per PR (see small PRs).
  • Self-reviewed before you request anyone’s time (self-review).
  • Green checks. Don’t ask for review while tests fail, unless you say why.
  • Opened as a draft if it’s not ready.

The name comes from the open-source model: you ask the project owner to pull your changes from your fork or branch. The change doesn’t have to be code. Docs and config changes use the same process, and a code review applies to them equally.