git cherrypicking with merged commits

49 Views Asked by At

I haven't use cherry-picking that much in the past, but I need to use it today. So far the commits are linear so I got no problem

But what happen in the following situation

enter image description here

I want to cherry pick all the commits from 1 to 7. But from commit 3 to 5 there was a merge (not fast forward)

I want to reproduce this in another branch (main for example)

Can I just cherry pick normally 1,2,3,4,5,6,7

or should I do 1,2,3,4,7,5,6?

0

There are 0 best solutions below