Skip to content
IonWarpTry for free
What is a pull request

What is a pull request? How a GitHub pull request works

“Pull requests are proposals to merge code changes into a project.”[1] You push your commits to a branch, open a pull request against the branch you want them in, and the team reviews the diff before it merges.

GitLab calls the same thing a merge request.[2] The name comes from git itself: git request-pull asks a maintainer to pull your branch.[3]

What a pull request holds

  • Conversation

    The description, the timeline, the comments and the reviews.[1]

  • Commits

    How the pull request's branch changed over time.[1]

  • Checks

    The automated tests, builds and other validations that run on it.[1]

  • Files changed

    The diff the reviewers read.[1]

  • Draft

    A draft pull request cannot be merged, and code owners are not asked to review it: a way to share work in progress before asking for review.[1]

How a pull request moves from open to merged

  1. A branch or a fork

    On a team, collaborators push topic branches to one shared repository. On open source, anyone who can read a repository can fork it and open a pull request from the fork.[1]

  2. Review

    Reviewers comment, approve or request changes.[4] Request changes does not block the merge unless a ruleset or branch protection rule requires reviews.[5] How to review a pull request walks through it, and the code review checklist says what to look for.

  3. Approval

    An author cannot approve their own pull request. With required reviews and stale review dismissal on, a new commit that changes code dismisses an approval.[5] An approval is often written LGTM.

  4. Merge

    A merge commit keeps every commit and adds one that joins the branch. Squash and merge combines the commits into one. Rebase and merge adds each commit onto the base branch without a merge commit.[6]

Pricing

Simple pricing for your whole team.

One workspace price with seats included. Credits pool across your team. Unlimited repos on every plan.

Starter

$0 /mo

Try AI PR review.

  • 2 reviewers
    • Code Review
    • Security Review
  • 3 seats included
  • 15,000 credits to start, then 5,000/mo
  • Unlimited repos
Get Started

Max

$149 /mo

Scale AI PR review.

  • +9 reviewers
    • UX Review
    • API Performance
    • Analytics Review
    • SEO Review
    • Changelog
    • CI/CD Performance
    • Plan Review
    • Repeat-Failure Learnings
    • SOC 2 Review
  • 10 seats included
  • +75,000 credits/mo
  • +$29/mo per added seat
  • Unlimited repos
  • Priority support
Choose Max
Enterprise

Custom reviewers + credits · GitHub Enterprise · SSO/SAML + audit logs · Custom security review + SLA

Contact us
FAQ

Frequently asked questions

What is a pull request on GitHub?

A proposal to merge code changes into a project. It shows the diff, runs the checks and collects the reviews, and a maintainer merges it when it is ready.

What is the difference between a pull request and a merge request?

None: GitHub says pull request, GitLab says merge request. GitHub's head and base branch are GitLab's source and target branch.

What is a draft pull request?

A pull request marked as work in progress. It cannot be merged, and code owners are not asked to review it until the author marks it ready.

Can you approve your own pull request?

No. GitHub does not let a pull request's author approve it; another person with access must.

What does squash and merge do?

It combines the pull request's commits into one commit on the base branch, so the history shows one commit per pull request.

Sources

  1. About pull requestsGitHub Docs · read
  2. Merge requestsGitLab Docs · read
  3. git-request-pull documentationGit · read
  4. Pull request reviewsGitHub Docs · read
  5. Approving a pull request with required reviewsGitHub Docs · read
  6. About merge methods on GitHubGitHub Docs · read