git cherry-pick -x A^..B # without the ^, commit A will be ignored # -x is recommended for browsable links in github or gitlab useful to see where a commit was picked from.