Lesson 17 of 26
In Progress

Dealing with Common Problems: Merge Conflicts

Your Turn

You should have a merge conflict in the README.md file because you edited it both in RStudio and on GitHub

  1. Open up the README.md file and find the conflict markers, conflict divider, and identify which parts of the code come from the changes you made in RStudio and which come from the changes you made on GitHub
  2. Edit the README.md file to resolve the merge conflict
  3. Commit (I usually use a message like “fix merge conflict”)
  4. Push your code to GitHub
Learn More

If you get a merge conflict and it makes you feel like you need a hug, Allison Horst has you covered.

Have any questions? Put them below and we will help you out!

  1. When I delete the code I don’t want from the merge conflict in the R script box in R Studio and try to commit it, I am getting the following message, “error: Committing is not possible because you have unmerged files.”. How do I address this?

    1. It’s likely you still have a merge conflict somewhere that you haven’t yet dealt with. Take a look all the way to the bottom of your file and let me know if you see anything!