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

how does sourcetree merge git branches

HappyPappy July 28, 2016

We just had a funny case where we were merging a feature branch back to our master branch and both Eclipse and IntelliJ "missed" merging some changes from the feature branch onto our master branch.

i.e. changes to source files did not come across to the master branch.

We tried various merge strategies (recursive, ours, octopus, etc.) with no luck.

We work in a fairly large project and were dreading having to go through and validate differences one by one.

Then I fired up SourceTree and it merged everything as expected and am just trying to figure out the difference, is anyone able to explains this?

Thanks!

1 answer

0 votes
jbryson3 July 28, 2016

I wouldn't know why they're merging any differently. But sourcetree will allow you to see exactly what git commands it is running. You can open the command history panel.

Here's where mine was found in OSX Sourcetree (2.3.1)

image2016-7-28 12:23:24.png

Maybe that will give some clues into how sourcetree is doing it 'right'

HappyPappy July 28, 2016

The IntelliJ command;

git -c core.quotepath=false merge --no-commit --no-ff master-wp3b 

The SourceTree command; 

git -c diff.mnemonicprefix=false -c core.quotepath=false merge --no-commit master-wp3b 

The only obvious difference is the diff.mnemonicprefix setting.

However, the thing that appears to also be different is that we were merging to the remote branch reference remotes/origin/master-wp3b when things weren't working and to the local master-wp3b branch when things were.

So the question now becomes why would these two diverge in this context?

Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events