Atom

The Atom text editor has a built in merge conflict tool that enables you to simply choose which branch you would like to keep. Instead of removing the content you don’t want and those pesky merge conflict markers, you simply choose theirs or yours.

instructions for this activity

To see the Atom merge conflict tool in action, perform the following:

If you already completed all of the exercises in this course, you can re-import the course repository and give it a different name.

  1. Clone the repository locally.
  2. Checkout to the username-config branch.
  3. In the terminal, open Atom using the atom . command.

    Depending on your operating system, you may need to configure this behavior.

  4. Edit the _config.yml file, making changes to lines 12-19 and save the file.
  5. Create a commit based on those changes.
  6. Checkout the master branch.
  7. Enter git merge username-config while on the master branch. You will encounter a merge conflict.

    If there are multiple files within the merge, you can type git status to see which file (or files!) is causing the conflict.

  8. Open the _config.yml file with Atom.
  9. Select the Use me option for your changes.
  10. Enter git add _config.yml followed by git commit -m "Add my config changes" and enter enter.
  11. Congratulations, you resolved a merge conflict locally with the Atom editor!

electrocat

Stuck? Open an issue in the repository for this class and mention @githubteacher for help from one of the GitHub trainers!
Continue