Bob’s Simple Conflict

We need to modify the resume template so it contains our information. Using the GitHub Flow, we can make those changes by:

instructions for this activity

  1. In your imported version of the repository, checkout to the branch named: username-config.
  2. While on that branch, open the _config.yml file.
  3. Lines 12-19 should be modified with your information. If you would prefer to create a fictional resume, your favorite fictional character’s information.
  4. After making the changes, create a commit, an example commit message might be: Add my information.

    If you made the changes on your local machine, push your changes back to repository on GitHub.

  5. Create a new pull request. Use the base: of master and the compare: of username-config.
  6. Although GitHub reports that you can’t automatically merge these changes, you can still start the pull request. Click Create pull request.
  7. In the This branch has conflicts that must be resolved section of the pull request, click the Resolve conflicts button to resolve the merge conflict.
  8. It would appear that Bob Belcher recently made changes to the master branch and modified the exact same line you did, this is what caused the merge conflict to occur. Click “Resolve conflicts”, and remove Bob’s contributions to the gh-pages branch by deleting all of the content below the ======= and above the >>>>>>> gh-pages content.

    To dive into all of the odd symbols on your screen, check out the Tell me why section.

    bob saying we are radically off plan

  9. We still can’t mark as resolved because we need to remove the merge conflict markers. Delete the following lines: <<<<<<< username-config, =======, and >>>>>>> gh-pages.
  10. With the merge conflict markers removed, click Mark as resolved. Congratulations, you successfully resolved a merge conflict! Go ahead and merge the pull request.

    bob belcher excited about your progress

Tell me why

Examing Merge Conflicts

Looking at an example merge conflict from our help documentation, we can discuss the different pieces that encompass a merge conflict.

If you have questions, please
<<<<<<< HEAD
open an issue
ask your question in IRC.
>>>>>>> branch-a

The <, =, and > symbols simply identify where the merge conflict occurred. We can see that both HEAD and branch-a are listed in the merge conflict. HEAD is pointing to the branch that you are currently checked out to, so it might say the branch you currently are on or HEAD. The other branch listed, in this example, branch-a identifies that changes exist on another branch that conflict with the changes we made.