Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,899
Community Members
 
Community Events
184
Community Groups

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

0 votes
Answer accepted
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 04, 2015

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.

 

A) I have tried reading the documentation on a merge conflict - it is terrible documentation with lots of explanations but no examples.  Doesn't really work for a visual learner.

B) Step 2 - there is no Tools/Options/Diff.  There is a Preferences option with a Diff tab, but there are no instructions about what to type in the command areas!

C) The "Resolve conflicts" option is not appearing anymore.

This may have been a good answer 4 years ago - it's not really helpful now.

Like pgopalakrishnan likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events