Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools GitHub Basics Working By Yourself Conflict Resolution

Josie Nagy
Josie Nagy
14,992 Points

GitHub Local vs Remote Conflict

Hi everyone! I started using Github and Github pages recently and now I'm at a loss with the conflict I've managed to create :astonished:

Terminal message:

On branch gh-pages
Your branch and 'origin/gh-pages' have diverged,
and have 2 and 2 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)
Unmerged paths:
  (use "git reset HEAD <file>..." to unstage)
  (use "git add <file>..." to mark resolution)

    both added:      README.md

no changes added to commit (use "git add" and/or "git commit -a")

As a beginner, do you have any suggestions on what I should do next? Can anyone explain or give some context as to what I did wrong?

Thank you!

I think you might have added a readme on the github website and you dont have it present locally on your computer, and then you probably made some changes locally that are not present in github? gitpull will get the readme from github, but you may need to resolve some conflicts after

2 Answers


Did you change the readme on the Github website so it differs from your local copy? If so you need to "pull" the changes to your local machine, then push your project up to Github.

Hope that helps, happy coding


Josie Nagy
Josie Nagy
14,992 Points

Thank you everyone for trying to help and sorry for the late update! Yes, I was finally able to resolve all the conflicts with some help from a friend. I had made a lot of commits directly into the remote master (README file) and then attempted to fix it locally in the gh-pages I think. It was a mess, I'm happy I was finally able to fix it.

Thanks again!