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 merge with sourcetree git without command line

Hello I'm getting crazy finding out the workflow when merging and having conflicts. It is not that easy as it might seem...

After sourcetree shows up the dialog that I have to resolve manualy the conflicts, where is the window showing me the conflicting files? Where did I get a side by side view of the 2 versions. How can I mark a conflict resolved and how do I commit.

Thanks a lot


2 answers

1 accepted

2 votes
Answer accepted

All conflicts will show up in the File Status view primarily (the first button on the tab control in the top-left, or Cmd-1). You can also see them if you select the 'Uncommitted Changes' line in the log view too, but the File Status view is the one that has the full functionality, particularly in Git where there's staging too.

The conflicted files are marked with an exclamation mark in a yellow triangle. You can see the diff on the right when you select the file, and you can see the diff against the two different parents by selecting 'Diff Parent' or 'Diff Merged' in the top bar of the diff area.

To resolve the conflicts, right-click a file and select Resolve Conflicts submenu (this is also available on the Actions top-level menu). There are lots of options in there, the most common one is the one at the top labelled 'Launch External Merge Tool', where you can launch the 3-way merge tool of your choice as set in Preferences (default FileMerge). Also in that menu are options for restarting the merge for that file if you do something unintentional when resolving, or to just accept one or other side of the merge, or mark things as resolved manually.

And committing is just done the usual way once you've resolved your conflicts, this is no different to committing usually.

Thanks a lot. I've set up a small testcase with 3 repositories a, b and c. b is a bare repository, and it is added as remote to a and c. So I'm able to simulate 2 developers working in their local git repos a and c and syncing to b.

Whe I simulate now a merge conflict by commiting one file with different lines in both local repos push on one side and try to resolve the merge conflict on the other side, as you explain I can see the confilict in the File Status View.

I can switch between dif parent and dif merged But even when starting the external diff tool I do not see side by side the change on one side and on the other side. What I see is the change on one side and a textual diff on the other side. Or to better explain if I changed in the a repo the line to


and on the b repo to


I see eighter



<<<<<<< HEAD




>>>>>>> 11a5f2ae21e4c60fbdc6d7436b9c38bd088cd8d7


<<<<<<< HEAD




>>>>>>> 11a5f2ae21e4c60fbdc6d7436b9c38bd088cd8d7





what I would expect

What am I doeing wrong??

The 'chevron' markers are the standard notation when displaying conflicts within a file. To resolve this in a nice side-by-side view, right-click the file and select 'Resolve Conflicts > Launch External Merge Tool', which by default will be FileMerge.

Alternatively, some people like to resolve conflicts just by editing the file. The chevron markers show you the conflicts and from which version they came from, you can (if you want) just edit the file directly to merge the contents (removing the <<<< >>>> ===== markers). But the external merge tool is more friendly.

Once the unresolved icon shows on the file, right click on it >> "Resolve Conflicts" >> "Launch External Resolve Tool".

I really like P4Merge tool which you can download for free. Once you install it, go into SourceTree Tools menu >> Options >> Diff tab (2nd from left). It should not show up as an of the drop down option for 'Merge Tool', select that.

Now when you could just use P4Merge tool from SourceTree and it will shows you all the changes side by side. You can use any of your favorite merge or difference tool for your SourceTree managed files in the same way.

I might add once I run the merge tool and exit from there, SourcTree marks the file as merged even though If I had choosen not to save changes (equal to cancelling). I had to manually mark the file unresolved to be able to redo the merge.


Suggest an answer

Log in or Sign up to answer
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...

4,042 views 0 11
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