How to resolve merge conflicts?

I had a branch that I needed to split into two (main branch: 3.2.0, new branch: 3.1.2 which was created by using "checkout".  I made my changes to the new branch and now I want to merge 3.2.0 into 3.1.2.  So I did a merge and now I have 3 files with "conflicts":

Screen Shot 2015-01-04 at 1.31.14 PM.png

So, I look at each file on the right of SourceTree and I see this:

Screen Shot 2015-01-04 at 1.32.31 PM.png

What do I do with this?  What I would like to do is put this file(s) into an editor where I can make the changes.  I don't understand why the other 20 files made it through without any "conflicts" and these three did not... or do I have more of a mess than is showing?

I think your app SourceTree is a god-send... don't know what I would do without it, but I think I really don't understand Git that well to be able to do this on my own.  Thank you for your understanding.

Regards,

Rolf
Prager, Phone Apps

1 answer

1 accepted

First of all, please do some reading in order to understand what a merge conflict is. Afterwards, you need to do the following:

  1. Install a diff tool that can do 3-way merges, for example KDiff3.
  2. Configure this to be your external diff/merge tool in SourceTree (in Tools/Options/Diff).
  3. In the place where you took the 1st screenshot, right-click on a file, Resolve Conflicts\Launch External Merge Tool
  4. Repeat the previous step for each conflicted file.
  5. Commit (and push) your changes.

Balazs:  boy, that (KDiff3) is one hell of a tool... thank you so much... I appreciate it.

 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Keough
Published 2 hours ago in Training & Certification

The Project Administration in Jira Server Certification is here!

The Atlassian Certification you've been waiting for is here for good. We're thrilled to announce the official launch of our new Certification for Project Administration in Jira Server! The offering ...

39 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you