You can resolve simple merge conflicts that involve competing line changes on GitHub.

You can only resolve the merge conflict on GitHub Enterprise, if your merge conflict is caused by competing line changes, such as when people make different changes to the same line of the same file on different branches in your Git repository. For all other merge conflicts, you must resolve the merge conflict locally on the command line.

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

  2. In the "Pull Requests" list, click the pull request with a merge conflict that you'd like to resolve.

  3. Near the bottom of your pull request, click Resolve conflicts. resolve merge conflicts button

    Tip: If the Resolve conflicts button is deactivated, your pull request's merge conflict is too complex to resolve on GitHub Enterprise. You must resolve the merge conflict using another Git client like Atom's Git integration or the command line. For more information see "Resolving a merge conflict using the command line."

  4. Decide if you want to keep only your branch's changes, keep only the other branch's changes, or make a brand new change, which may incorporate changes from both branches. Delete the conflict markers <<<<<<<, =======, >>>>>>> and make the changes you want in the final merge.

    view merge conflict example with conflict markers

  5. If you have more than one merge conflict in your file, scroll down to the next set of conflict markers and repeat steps four and five to resolve your merge conflict.
  6. Once you've resolved all the conflicts in the file, click Mark as resolved. click mark as resolved button
  7. If you have more than one file with a conflict, select the next file you want to edit on the left side of the page under "conflicting files" and repeat steps four through seven until you've resolved all of your pull request's merge conflicts. select next conflicting file if applicable
  8. Once you've resolved all your merge conflicts, click Commit changes. This merges the entire base branch into your head branch. resolve merge conflicts button
  9. To merge your pull request, click Merge pull request. For more information about other pull request merge options, see "Merging a pull request."

Further reading