Version control
What is a Pull Request?
Definition
A pull request is a proposal to merge one branch into another, opened on a hosting platform so the changes can be reviewed, discussed and tested first.
Also known as: PR, Merge Request, MR
Pull Request in more detail
It is worth knowing that this is not a Git feature. Git can merge branches without anything resembling a pull request; GitHub invented the workflow, GitLab calls the same thing a merge request, and the platform is what supplies the diff view, the comment threads, the approvals, the status checks and the merge button. The underlying operation is still an ordinary merge.
The pull request is where automation and human judgement meet. Continuous integration runs the tests, linters and security scans against the proposed result and reports back; reviewers read the diff for correctness, clarity and consequences the author may not have considered; branch protection rules can require both to pass before the merge button unlocks. The review is also the moment the change becomes shared knowledge rather than one person's private context.
Size is the single biggest factor in whether that works. A fifty-line pull request gets real scrutiny; a two-thousand-line one gets 'looks good to me', because reviewer attention does not scale with diff length. The merge strategy matters less but is worth choosing deliberately: a merge commit preserves exactly what happened, squashing collapses the branch into one tidy commit on main and loses the intermediate steps, and rebasing produces a linear history with rewritten hashes.
Pull Request example
1. git switch -c fix/rate-limit-header
2. commit, then git push -u origin fix/rate-limit-header
3. open a pull request: fix/rate-limit-header -> main
On the platform
files changed line-by-line diff and comments
checks CI: tests, lint, type-check, scans
reviewers approvals, change requests
protection rules 1 approval + green CI before merge
Merge strategies
merge commit keeps every commit plus a merge node
squash one commit on main, branch history discarded
rebase replays commits linearly, new hashes
A good description says WHY, links the issue, and notes what
was tested. The diff already says what changed.Pull Request — common questions
- What is the difference between a pull request and a merge request?
- Nothing functional — GitHub and Bitbucket call it a pull request, GitLab calls it a merge request. Both describe a proposed merge of one branch into another, with review and automated checks attached.
- Is a pull request part of Git?
- No. Git provides branches and merging; pull requests are a feature of hosting platforms built on top. You can merge branches locally without ever opening one.
- Should I squash commits when merging?
- Squashing keeps main readable when a branch contains many small work-in-progress commits. Keeping the individual commits is better when each is meaningful and independently revertible. Pick one convention per repository and apply it consistently.
Keep reading
Every definition in the set is indexed A-Z in the developer glossary, and the cheat sheets cover the syntax once you know what you are looking for.
Browse the A-Z glossary