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

What do I remove or keep in console

Because if I remove all it is saying u removed what wanted to keep. If remove one it telling first pessemitic branch

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.

<<<<<<< HEAD




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

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

2 Answers

Dale Severude
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Dale Severude
Full Stack JavaScript Techdegree Graduate 71,337 Points

Hi Abdullahi,

For the first conflict you need to delete the markers and also the content you don't want.

<<<<<<< HEAD
It tries its best to resolve problems on its own.
=======
It pretty much can't ever resolve problems.
>>>>>>> pessimistic_branch

To resolve this block to the HEAD, you will have this line left.

It tries its best to resolve problems on its own.

Or to resolve this block to the pessimistic_branch, you will have this line left.

It pretty much can't ever resolve problems.

It has to be one of these options or the other. I hope this makes sense.

It is not working please clarify what you mean . This is not working

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,053 Points

Hi Abdullah.

So for a merge conflict it'll display a message in your console telling you where there's been a merge conflict in Git and the content you might want to keep.

You then need to go to the file where the conflict has taken place, make the changes, save the changes and then stage and commit those changes in Git.

Conflict resolution is about clearing up the "mess" in the file and deciding how you want your file to look when you stage the conflict resolution to Git. :-)