Reputation: 129
I know basic merging. To merge A
into B
:
git checkout B
, git merge A
. But how can I merge into a new branch?
I want a totally new branch where I can work with the result of both A
and B
.
In other words, I want my branch B
as the base in the new branch C
and get merged by A
.
So, the result would be C = B + A
. Not C = A + B
.
How can I achieve that?
Upvotes: 1
Views: 1658
Reputation: 151
You can do following
git checkout -b "C"
(while being in branch B, then you will have everything from B into C)Upvotes: 2