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:Ā 

How to Merge content from multiple branches into a single branch in source tree?

shouren dalvi
May 13, 2013

I have 5 branches in sourcetree which has various files in it

for eg- blogs-b2,blogs-log,frontaccounting,crm,contentmanagement

I want to merge the contents of these branches into a single branch named Simplescripts.

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 13, 2013
  1. Create the Simplescripts branch if it doesn't already exist, anc check it out (there's an auto-checked box in the create branch dialog that will do that for you)
  2. Right click on one of your branches eg blogs-b2, select 'Merge' & confirm
  3. Repeat 2 for each of those other branches

If you have any conflicts after 2. you can resolve them by right-clicking the file, selecting Resolve Conflicts and picking an option, such as Resolve in External Merge Tool to interactively merge with a merge tool.

(Note, in git there's a type of merge called an 'octopus merge', where you can merge many branches into one at once. SourceTree can display octopus merges but doesn't let you create them right now - to be honest I think separate merges are tidier anyway ;))

shouren dalvi
May 13, 2013

Thanks a lot!!

shouren dalvi
May 13, 2013

Thanks a lot steve!..I tried it and it worked smoothly!!

TAGS
AUG Leaders

Atlassian Community Events