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

If the pull request does not have any merge conflicts, you can merge it on your GitHub Enterprise instance. If the pull request does have merge conflicts, or if you'd like to test the changes before merging, you can check out the pull request locally and merge it using the command line.

If you decide you don't want the changes in a topic branch to be merged to the upstream branch, you can close the pull request without merging.

Merging a pull request on GitHub Enterprise

  1. Under your repository name, click Pull requests. Issues and pull requests tab selection

  2. In the "Pull Requests" list, click the pull request you'd like to merge.

  3. Click Merge pull request or if you have merge squashing enabled, click Confirm squash and merge. Squash and merge button

  4. Type a commit message, or accept the default message. Commit message field

  5. Under the commit message box, click Confirm merge or Confirm squash and merge. Confirm button

  6. Optionally, delete the branch. This keeps the list of branches in your repository tidy.

Pull requests are merged using the --no-ff option, except for pull requests with squashed commits, which are merged using the fast-forward option.

You can close corresponding issues using a keyword in your pull request or commit message. For more information, see "Closing issues using keywords."

Further reading