git format-patch

Prepare .patch files. Useful when emailing commits elsewhere. See also git am, which can apply generated .patch files. More information: https://git-scm.com/docs/git-format-patch.

git format-patch origin

git format-patch revision_1..revision_2

git format-patch -3