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 Git Basics Merging Conflict Resolution

Pablo Grippo
Pablo Grippo
25,765 Points

I can't resolve the first merge conflict. Please help me!

It says me Bummer! You didn't get rid of pessimistic_branch's comment in the first conflict - we don't want to keep that one.

I don't know what I am doing wrong.

conflicted_file.txt
This is a text file! It's a fun little text file - it never really did anything to hurt anyone. 
The only problem with our fun little text file is that it has conflict resolution issues.

It tries its best to resolve problems on its own.

It pretty much can't ever resolve problems.

Whenever it runs into a problem, it asks other people for help.

Maybe you can help it resolve its issues?
But it's a very needy file, so people often leave it alone. 

1 Answer

I placed this and it seemed to work. Maybe you need to leave a newline in between.

Edit: Oh, the problem asking to resolve a git merge conflict. The task is asking you to keep the HEAD version and remove the pessimistic branch version.

In git, if there merge conflict, it will provide the two versions that would take up the same space and by removing one of the versions, we essential 'remove' that conflict.

Like so:

This is a text file! It's a fun little text file - it never really did anything to hurt anyone.

The only problem with our fun little text file is that it has conflict resolution issues.

It tries its best to resolve problems on its own.

Whenever it runs into a problem, it asks other people for help.

Maybe you can help it resolve its issues?

Also check out this SO post when solving git merge conflicts for your own projects on your local machine: http://stackoverflow.com/questions/161813/fix-merge-conflicts-in-git. :D