It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to resolve merge conflicts in sourceTree

David Newey May 08, 2015

I have a develop branch that I just committed files to. During the commit I got a pop-up that said there were merge conflict due to an earlier commit by another developer. Instructions in the pop-up said to go to 'Resolve Conflicts' and use those options. The only options I am given under Resolve Conflicts are 'Restart Merge' or 'Mark Unresolved' neither of which is an acceptable solution. How do i actually resolve merge conflicts?

2 answers

4 votes
Tim Crall May 08, 2015

You can resolve merge conflicts manually by opening the conflicted files in any editor.  The conflicts have been marked up like this:

<<<<<<< HEAD
// code from base branch
=======
// code from merged branch
>>>>>>> branch1

You can then manually edit the code to contain one or the other or a synthesis of both changes and remove the markups.  Then stage and commit to complete the merge. 

 

Jayan Anuranga Sep 22, 2017 • edited

good

Like a100402 likes this
2 votes
Seth May 08, 2015

You have to configure SourceTree to use your merge software. In the Diff tab of the Options dialog, look for the Merge tool dropdown for a list of programs that SourceTree knows how to use out of the box.

ronaldo.rosa I'm New Here Apr 16, 2019

123

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

376 views 0 9
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you