Resolve Merge Conflict

Resolve a merge conflict

  1. Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab.

  2. At the bottom of the page, under "This branch has conflicts that must be resolved", click the Resolve conflicts button.

  3. Look for the highlighted sections that begins with <<<<<<< my-resume and ends with >>>>>>> main. These markers are added by Git to show you the content that is in conflict.

  4. Remove the changes made on the main branch by deleting all of the content below the ======= and above >>>>>>> main.

  5. Next, remove the merge conflict markers by deleting the following lines:

    <<<<<<< my-resume
    =======
    >>>>>>> main
  6. With the merge conflict markers removed, click Mark as resolved.

  7. Finally, click Commit merge.

Create your own conflict

We went ahead and added a new file called references.md and pushed that change to main, without updating your my-resume branch.

  1. Browse to the my-resume branch.

  2. Click the Add file dropdown menu and then on Create new file.

  3. Create a file named references.md.

  4. Enter some text that conflicts with what we added for references.md in the main branch.

  5. Scroll to the bottom of the page and enter a commit message for your change.

  6. Click the Commit new file button, making sure the "Commit directly to the my-resume branch" option is selected.

Merge your pull request

  1. First, resolve any remaining conflicts in your pull request.

    Look back at step one if you need help.

  2. Click Merge pull request.

  3. Delete the branch my-resume (optional).

Last updated