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

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

This widget could not be displayed.
  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 ;))

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

873 views 2 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you