Pick the range of commits (from A to B inclusive) from source branch and apply to destination branch
-
cherry-pick
git cherry-pick A~..B
orgit cherry-pick A^..B
(NB: UseA\\^
when using Oh-My-ZSH)
-
rebase
0. Checkout a new temporary branch at the current location
git checkout -b tmp
0. Move the destination branch to the head of the new patchset
git branch -f integration last_SHA-1_of_source_branch_range
0. Rebase the patchset onto tmp, the old location of destination branch
git rebase --onto tmp first_SHA-1_of_source_branch_range~1 destination