Try it. Hope it's not too late.
NUM=1 for commit in $(git log --cherry-pick --no-merges --left-only branchB...branchA --reverse --pretty=tformat:"%H") do git format-patch -1 $commit --start-number $NUM ((NUM++)) done
--reverse causes git-log to output the results in the reverse order - from earliest to last, "%H" its format containing only commit sha1 hash. Hashes are provided as a single ( -1 ) to create a patch. --start-number with an extra value causes the patch files to be created in the correct order.
source share