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] PR is short for pull request, and the name comes from git itself: git request-pull asks a maintainer to pull your branch.[3]
Updated
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] The pull request checklist is for when it is ready.
How a pull request moves from open to merged
git switch -c fix-login-redirect
git commit -am "Fix the login redirect"
git push -u origin fix-login-redirect
gh pr create --base main --title "Fix the login redirect" --body "Returns users to the page they came from."When to open a pull request
Open one when someone else should read a change before it reaches a shared branch, or when you can't push to the repository. On a solo repository with no required reviews or checks, skip it and push to the branch directly.
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]
How to open a pull request
Push your branch, then click Compare & pull request in the banner on GitHub, or run gh pr create in a terminal. The base branch is where you want the changes and the compare branch holds them. A title and a description tell reviewers what they are reading.[7]
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.
What it means to approve a pull request
Approving signals that the changes are ready to merge.[4] 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.
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]
What closing a pull request means
Closing ends a pull request without merging it. GitHub says it fits a change that is no longer needed or that other work has replaced, and that the discussion and history stay for reference.[8]
What is a good pull request size?
A good pull request is small enough to serve one purpose. GitHub's docs say small, focused pull requests are easier to review and safer to merge, and they set no line limit.[9] We split the 50 open-source PRs in Martian's code review benchmark by changed lines; the median is 280 changed lines and 8 files. On average, nine AI reviewers found about half the known issues at every size up to 1,000 lines, while findings that matched no known issue rose from 1.0 per reviewer per PR at up to 300 lines to 1.8 above that.[10] IonWarp's column is its Code Review agent on DeepSeek V4.1 Flash, which is about average on what it finds and noisier than average past 300 lines. These PRs were picked because they hold known bugs, a finding that matched none is not always wrong, and only 3 are over 1,000 lines.
| IonWarp | All 9 reviewers, known issues found | All 9 reviewers, findings that matched none | |
|---|---|---|---|
| Up to 100 changed lines (11 PRs) | IonWarp: 12 of 23 known issues, 1.0 matched none per PR | All 9 reviewers, known issues found: 47%[10] | All 9 reviewers, findings that matched none: 1.0 per PR[10] |
| 101 to 300 changed lines (16 PRs) | IonWarp: 26 of 45 known issues, 1.0 matched none per PR | All 9 reviewers, known issues found: 52%[10] | All 9 reviewers, findings that matched none: 1.1 per PR[10] |
| 301 to 1,000 changed lines (20 PRs) | IonWarp: 35 of 79 known issues, 2.1 matched none per PR | All 9 reviewers, known issues found: 47%[10] | All 9 reviewers, findings that matched none: 1.8 per PR[10] |
| Over 1,000 changed lines (3 PRs) | IonWarp: 4 of 11 known issues, 3.0 matched none per PR | All 9 reviewers, known issues found: 30%[10] | All 9 reviewers, findings that matched none: 2.0 per PR[10] |
Sources
Sources checked to : each one says the day we read it.
- GitHub Docs, About pull requests, read .
- GitLab Docs, Merge requests, read .
- Git, git-request-pull documentation, read .
- GitHub Docs, Pull request reviews, read .
- GitHub Docs, Approving a pull request with required reviews, read .
- GitHub Docs, About merge methods on GitHub, read .
- GitHub Docs, Creating a pull request, read .
- GitHub Docs, Deploying code, read .
- GitHub Docs, Helping others review your changes, read .
- IonWarp benchmark, The code review benchmark: 50 pull requests, 158 known issues (release of 2026-10-06), read .

