git format-patch -x
with -x
the amount of commits from the current head.
To check the patches you could print it to stout first with the --stdout
flag.
git format-patch -x -o <directory>
See also https://devconnected.com/how-to-create-and-apply-git-patch-files/
https://www.ivankristianto.com/create-patch-files-from-multiple-commits-in-git/