a1----a2----a3-----a4 (branchA)
\
\b1---b2---b3---b4----b5----b6 (branchB)
current I am in branchA(a4)
, if I do git cherry-pick b3
what happens? diff of b3 and b2 will be patched to a4?
a1----a2----a3-----a4 (branchA)
\
\b1---b2---b3---b4----b5----b6 (branchB)
current I am in branchA(a4)
, if I do git cherry-pick b3
what happens? diff of b3 and b2 will be patched to a4?
If there are no conflicts, then the history after cherry-pick b3
will be:
a1----a2----a3-----a4----b3' (branchA)
\
\b1---b2---b3---b4----b5----b6 (branchB)
where b3'
is the same change as b3
but rebased against branchA
.
If you have any conflicts, then the cherry-pick
command will tell you so and prompt you to resolve the conflicts manually before committing b3'
.
In particular, doing a cherry-pick b3
does not include the changes b1
and b2
.