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

SourceTree aborts merge rather than merge with conflicts

T K September 16, 2016

In a very simple set up whenever i PULL from my branch i get 'merge aborted' if there is even a single line conflict in a remote file and my uncommitted changes.

error: Your local changes to the following files would be overwritten by merge

Please, commit your changes or stash them before you can merge.
Aborting

Sure enough, if i stash my changes or revert them i can perform the PULL just fine but i want to pull the remote file changes and have them as conflicts which i can resolve locally before committing. I can't seem to find an option for that anywhere.

 

SourceTree 1.9.6.1 for Windows
Diff tool and Merge tool configured: P4Merge

2 answers

1 accepted

0 votes
Answer accepted
T K January 31, 2017

For anyone interested, it seems that SourceTree has a different approach on this.

When PULLing in Android Studio, Android Studio stashes and pulls behind the scenes (you can see the console logs) and then shows conflicts.

 

So, a developer has to manually perform these steps in SourceTree to achieve the same result. Stash the changes, PULL safely and then Unstash to merge the changes

0 votes
Rodney
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.
September 16, 2016

It seems you were trying to pull with uncommitted local changes.  It wants you to commit your changes first so that it can put your repo is a previous state in case you want to cancel the merge.

T K September 16, 2016

But this is exactly what i want...

Android studio, for example, which is also using Git is allowing for a valid PULL and then you have local conflicts to resolve. I don't see why SourceTree doesn't do that and i have to revert/stash changes...

Oddioengineer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 23, 2019

@Rodney This is how it has worked for years! It changed recently and I too am completely annoyed. It has always been that we could have local (un-committed) changes, Pull, and Resolve all in the staging area without extra steps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events