Pull requests documentation

Learn how to use pull requests to suggest changes to a project, receive suggested changes to your own projects, and address issues in pull requests, such as merge conflicts.

Overview

Start here

  • Changing a commit message

    If a commit message contains unclear, incorrect, or sensitive information, you can amend it locally and push a new commit with a new message to GitHub. You can also change a commit message to add missing information.

  • Resolving a merge conflict using the command line

    You can resolve merge conflicts using the command line and a text editor.

  • Creating and deleting branches within your repository

    You can create or delete branches directly on GitHub.

  • Creating a pull request

    Create a pull request to propose and collaborate on changes to a repository. These changes are proposed in a branch, which ensures that the default branch only contains finished and approved work.

  • About pull request reviews

    Reviews allow collaborators to comment on the changes proposed in pull requests, approve the changes, or request further changes before the pull request is merged. Repository administrators can require that all pull requests are approved before being merged.

  • Resolving a merge conflict on GitHub

    You can resolve simple merge conflicts that involve competing line changes on GitHub, using the conflict editor.

  • Syncing a fork

    Sync a fork of a repository to keep it up-to-date with the upstream repository.

  • Merging a pull request

    Merge a pull request into the upstream branch when work is completed. Anyone with push access to the repository can complete the merge.

What's new

View all

Guides

  • Approving a pull request with required reviewsIf your repository requires reviews, pull requests must have a specific number of approving reviews from people with write or admin permissions in the repository before they can be merged.

  • Reverting a pull requestYou can revert a pull request after it's been merged to the upstream branch.

  • Why are my commits linked to the wrong user?GitHub uses the email address in the commit header to link the commit to a GitHub user. If your commits are being linked to another user, or not linked to a user at all, you may need to change your local Git configuration settings, add an email address to your account email settings, or do both.

All Pull requests docs

Committing changes to your project

  • Creating and editing commits • 4 articles

  • Viewing and comparing commits • 2 articles

  • Troubleshooting commits • 2 articles

Collaborating with pull requests

  • Getting started • 2 articles

  • Working with forks • 8 articles

  • Collaborating on repositories with code quality features • 2 articles

  • Proposing changes to your work with pull requests • 12 articles

  • Addressing merge conflicts • 3 articles

  • Reviewing changes in pull requests • 11 articles

  • Incorporating changes from a pull request • 6 articles