How to generate patches with git format-patch

prepares e-mail-ready version of patches. In its basic invocations, it will create a  file per commit, of the form , where X is the number of the commit in the commit series.

Here's an example of using git-format-patch with OpenHatch:



Add a commit on your development branch

oh-mainline$ git branch master oh-mainline$ touch new_file oh-mainline$ git add new_file oh-mainline$ git commit -m "Test commit" 
 * Issue-#344

Generate a patch using

oh-mainline$ git format-patch master 0001-Test_commit.patch 



What  does is look at the commits between master and your current branch, in this case , and create a patch file per commit. means the same thing: make patches for the commits between  and.

http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html has full documentation on.

= See also =
 * Openhatch git workflow