The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Merging a bitbucket upstream branch with SourceTree

dguardiola
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!
May 8, 2012

I forked a Bitbucket repository with SourceTree

I created a pull request from bitbucket and my changes were merged. Now i want to merge others upstream repository changes to my fork (sync it).

I clicked in Bitbucket on the "compare fork"/ incoming button and got three command lines to use.

hg pull -r default http://upstream-repo</code<>>

hg update default

The third one "hg merge 925c1611d764" did not complete :

abandon : merging with a working directory ancestor has no effect

Now in source tree I can see I can see two local "default" branches, and I can't push to my fork anymore because it says this will create another new "default" branch.

What should I do to get out of this situation ?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
stevestreeting
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 Champions.
May 9, 2012

You just need to merge one of the default branch heads into the other one, so update to one of them, then right click the other and select 'Merge'. Once the merge is done, check if you have any conflicts to resolve as usual, then commit / push.

stevestreeting
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 Champions.
May 9, 2012

It shouldn't matter which one you picked, since both should have a common ancestor. Are you sure there's not another head still lying around somewhere?

If not, then this is probably just because someone else has pushed before you did, so you need to pull their changes, merge them too, then push.

dguardiola
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!
May 9, 2012

Thanks steve, I picked one and merged to the other, unfortunately looks like it was the bad one :

abort: push creates new remote head f4b0a1404147!
(did you forget to merge? use push -f to force)

TAGS
AUG Leaders

Atlassian Community Events