Create a pull request to propose and collaborate on changes to a repository. These changes are proposed in a branch, which ensures that the master branch is kept clean and tidy.

Pull requests can only be opened if there are differences between your branch and the upstream branch. You can specify which branch you'd like to merge your changes into when you create your pull request.

Tip: Project maintainers can add a pull request template for a repository. Templates include prompts for information the project's maintainers prefer to see in the body of a pull request.

  1. On GitHub, navigate to the main page of the repository.

  2. In the "Branch" menu, choose the branch that contains your commits. Branch dropdown menu

  3. To the right of the Branch menu, click New pull request.

    Pull Request button

  4. The Compare page will automatically select the base and compare branches; to change these, click Edit. Edit button for compare page
  5. On the Compare page, click Create pull request. Create pull request button
  6. Type a title and description for your pull request. Pull Request description page
  7. Click Create pull request. Send Pull Request button

After your pull request has been reviewed, it can be merged into the repository.