Git: How to merge 3 branches into another only one? (not Master)

Viewed 55

I have 3 branches. Can you hint me please, how to merge three branches (where is one based on another) into the new branch (not Master)?

1 Answers

Create your target branch from any of the branches you want to merge...

git checkout branchA
git checkout -b target

Then merge the other 2 branches into that

git merge branchB
... solve any merge issues
git merge branchC
... solve any merge issues

Done!

Related