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

  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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

799 views 0 4
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