Pull requests - GitHub Docs
https://docs.github.com/en/pull-requests/reference/pull-requests • 156 KB fetched Open original page
Pull requests - GitHub Docs Skip to main content
GitHub Docs Version: Free, Pro, & Team
Search or ask Copilot Search or ask Copilot
Select language: current language is English
Search or ask Copilot Search or ask Copilot
Open menu
Collapse sidebar Expand sidebar
Scroll breadcrumbs left
* Home
* Pull requests
* Reference
* Pull requests
Scroll breadcrumbs right
Pull requests
*
*
* Get started
* About pull requests
* About stacked PRs
* About forks
* Pull request quickstart
* Stacked PRs quickstart
* Review quickstart
* Concepts
* Write code
* Help others review your changes
* Give reviews
* Resolve reviews
* Deploy code
* How-tos
* Commit changes
* Manage branches
* Commit to PR branch from fork
* Create a commit with multiple authors
* Change a commit message
* Compare commits
* Troubleshoot commits
* Create pull requests
* Create a pull request
* Create stacked PRs
* Create a PR from a fork
* Draft pull requests
* Manage stacked PRs
* Update the head branch
* Change the base branch
* Request a PR review
* Stacked pull requests
* Review pull requests
* Check out a PR locally
* Review proposed changes
* Review stacked PRs
* Review dependency changes
* Comment on a PR
* Approve PRs
* View a PR review
* Dismiss a PR review
* Incorporate feedback
* Merge and close
* Resolve merge conflicts
* Resolve merge conflicts in Git
* Troubleshoot status checks
* Troubleshoot stacked PRs
* Merge a pull request
* Merge PR with merge queue
* Merge PR automatically
* Merge stacked PRs
* CI for stacked PRs
* Revert a pull request
* Close a pull request
* Work with forks
* Fork a repository
* Configure a remote repository
* Sync a fork
* Allow changes to a branch
* Detach a fork
* Reference
* Pull requests
* Stacked pull requests
* Stacked PRs CLI commands
* Stacked PRs APIs and webhooks
* Branches
* Forks
* Commits
* Stacked PRs and other tools
* Using query parameters to create a pull request
* PR reviews
* Status checks
* Pull request merges
* Merge conflicts
* Manage and standardize pull requests
* Tutorials
* Stack pull requests
* Roll out stacked PRs
Pull requests
Propose, review, and merge code changes using pull requests to collaborate effectively and maintain code quality.
Copy as Markdown
In this article
* Working with pull requests
* Draft pull requests
* Pull request refs and merge branches
* Differences between commits on compare and pull request pages
* Collaborative development models
* Further reading
Pull requests are proposals to merge code changes into a project. A pull request is GitHub's key collaboration feature , letting you discuss and review changes before merging them. This helps teams work together, catch issues early, and maintain code quality.
View your pull requests
Working with pull requests
A pull request brings together the context reviewers need to understand a change. This context is organized into tabs:
* The Conversation tab shows the description, timeline, comments, and reviews.
* The Commits tab shows how the pull request branch changed over time.
* The Checks tab shows automated tests, builds, and other validations.
* The Files changed tab shows the diff that reviewers use to understand the proposed changes.
* The Findings tab shows automated code review results, such as code scanning alerts, for the proposed changes.
Separately from the tabs, the merge status highlights blockers, missing approvals, and other requirements before merging. It appears in the pull request header and in the merge box.
Together, these views help authors and reviewers discuss the change, track feedback, and decide when the pull request is ready to merge.
Draft pull requests
When you create a pull request, you can choose to make it a draft pull request. Draft pull requests cannot be merged, and code owners are not automatically requested to review them. Drafts are useful when you want to share work-in-progress without formally requesting reviews.
When you're ready to get feedback on your pull request, you can mark your draft pull request as ready for review. Marking a pull request as ready for review will request reviews from any code owners. You can convert a pull request to a draft at any time. See Changing the stage of a pull request .
Pull request refs and merge branches
When you open a pull request, GitHub creates temporary Git references that point to the pull request's head branch and, when possible, to a simulated merge result. These refs help GitHub and integrations evaluate the pull request without changing the base branch.
For most contributors, these refs stay in the background. They are most relevant when you are building automation, debugging CI behavior, or fetching pull request state locally. For information about how GitHub Actions uses the merge branch, see Events that trigger workflows .
Differences between commits on compare and pull request pages
Compare pages and pull request pages can calculate changed files from different merge bases. As a result, the same branches can sometimes show different diffs in each place.
This usually matters when the base branch has changed since the pull request was created. Pull request pages focus on what the pull request introduced, while compare pages reflect the current comparison between two refs.
Collaborative development models
The way you use pull requests depends on the type of development model you use in your project. You can use the fork and pull model or the shared repository model.
Fork and pull model
In the fork and pull model, anyone can fork an existing ("upstream") repository if they have read access and the owner of the upstream repository allows it. Be aware that a fork and its upstream share the same Git data. This means that all content uploaded to a fork is accessible from the upstream and all other forks of that upstream.
You do not need permission from the upstream repository to push to a fork you created. You can optionally allow anyone with push access to the upstream repository to make changes to your pull request branch. This model is popular with open-source projects because it reduces friction for new contributors and lets people work independently without upfront coordination.
Tip
For more information on open source, specifically how to create and grow an open source project, we've created Open Source Guides that will help you foster a healthy open source community. You can also take a free GitHub Skills course on maintaining open source communities.
Shared repository model
In the shared repository model, collaborators have push access to a single shared repository and create topic branches when they need to make changes. Pull requests are useful in this model because they start code review and general discussion about a set of changes before the changes are merged into the main development branch. This model is more common with small teams and organizations collaborating on private projects.
Further reading
* Creating a pull request
* Branches
* Commenting on a pull request
* Creating a pull request from a fork
* Allowing changes to a pull request branch created from a fork
Back to top
Help and support
Was this Doc helpful?
Yes No
Help us make GitHub Docs great!
All Docs are open source. See something that's wrong or unclear? Submit a pull request.
Make a contribution
Still need help?
Ask the GitHub community Contact support Expert services Blog
GitHub Inc. © 2026 Terms Privacy Status Pricing
Links found on this page
- Skip to main content [direct]
- GitHub Docs [direct]
- Pull requests [direct]
- Reference [direct]
- About pull requests [direct]
- About stacked PRs [direct]
- About forks [direct]
- Pull request quickstart [direct]
- Stacked PRs quickstart [direct]
- Review quickstart [direct]
- Write code [direct]
- Help others review your changes [direct]
- Give reviews [direct]
- Resolve reviews [direct]
- Deploy code [direct]
- Manage branches [direct]
- Commit to PR branch from fork [direct]
- Create a commit with multiple authors [direct]
- Change a commit message [direct]
- Compare commits [direct]
- Troubleshoot commits [direct]
- Create a pull request [direct]
- Create stacked PRs [direct]
- Create a PR from a fork [direct]
- Draft pull requests [direct]
- Manage stacked PRs [direct]
- Update the head branch [direct]
- Change the base branch [direct]
- Request a PR review [direct]
- Stacked pull requests [direct]
- Check out a PR locally [direct]
- Review proposed changes [direct]
- Review stacked PRs [direct]
- Review dependency changes [direct]
- Comment on a PR [direct]
- Approve PRs [direct]
- View a PR review [direct]
- Dismiss a PR review [direct]
- Incorporate feedback [direct]
- Resolve merge conflicts [direct]
- Resolve merge conflicts in Git [direct]
- Troubleshoot status checks [direct]
- Troubleshoot stacked PRs [direct]
- Merge a pull request [direct]
- Merge PR with merge queue [direct]
- Merge PR automatically [direct]
- Merge stacked PRs [direct]
- CI for stacked PRs [direct]
- Revert a pull request [direct]
- Close a pull request [direct]
- Fork a repository [direct]
- Configure a remote repository [direct]
- Sync a fork [direct]
- Allow changes to a branch [direct]
- Detach a fork [direct]
- Stacked pull requests [direct]
- Stacked PRs CLI commands [direct]
- Stacked PRs APIs and webhooks [direct]
- Branches [direct]
- Forks [direct]
- Commits [direct]
- Stacked PRs and other tools [direct]
- Using query parameters to create a pull request [direct]
- PR reviews [direct]
- Status checks [direct]
- Pull request merges [direct]
- Merge conflicts [direct]
- Manage and standardize pull requests [direct]
- Stack pull requests [direct]
- Roll out stacked PRs [direct]
- View your pull requests [direct]
- Events that trigger workflows [direct]
- Open Source Guides [direct]
- GitHub Skills [direct]
- Make a contribution [direct]
- Ask the GitHub community [direct]
- Contact support [direct]
- Expert services [direct]
- Blog [direct]
- Terms [direct]
|
|