git-format-patch(1)
===================
NAME
----
git-format-patch - Prepare patches for e-mail submission
SYNOPSIS
--------
[verse]
'git format-patch' [-k] [-o
| --stdout] [--thread]
[--attach[=] | --inline[=] |
[--no-attach]]
[-s | --signoff] []
[-n | --numbered | -N | --no-numbered]
[--start-number ] [--numbered-files]
[--in-reply-to=Message-Id] [--suffix=.]
[--ignore-if-in-upstream]
[--subject-prefix=Subject-Prefix]
[--cc=]
[--cover-letter]
[ | ]
DESCRIPTION
-----------
Prepare each commit with its patch in
one file per commit, formatted to resemble UNIX mailbox format.
The output of this command is convenient for e-mail submission or
for use with 'git-am'.
There are two ways to specify which commits to operate on.
1. A single commit, , specifies that the commits leading
to the tip of the current branch that are not in the history
that leads to the to be output.
2. Generic expression (see "SPECIFYING
REVISIONS" section in linkgit:git-rev-parse[1]) means the
commits in the specified range.
The first rule takes precedence in the case of a single . To
apply the second rule, i.e., format everything since the beginning of
history up until , use the '\--root' option: "git format-patch
\--root ". If you want to format only itself, you
can do this with "git format-patch -1 ".
By default, each output file is numbered sequentially from 1, and uses the
first line of the commit message (massaged for pathname safety) as
the filename. With the --numbered-files option, the output file names
will only be numbers, without the first line of the commit appended.
The names of the output files are printed to standard
output, unless the --stdout option is specified.
If -o is specified, output files are created in . Otherwise
they are created in the current working directory.
By default, the subject of a single patch is "[PATCH] First Line" and
the subject when multiple patches are output is "[PATCH n/m] First
Line". To force 1/1 to be added for a single patch, use -n. To omit
patch numbers from the subject, use -N
If given --thread, 'git-format-patch' will generate In-Reply-To and
References headers to make the second and subsequent patch mails appear
as replies to the first mail; this also generates a Message-Id header to
reference.
OPTIONS
-------
:git-format-patch: 1
include::diff-options.txt[]
-::
Limits the number of patches to prepare.
-o ::
--output-directory ::
Use to store the resulting files, instead of the
current working directory.
-n::
--numbered::
Name output in '[PATCH n/m]' format, even with a single patch.
-N::
--no-numbered::
Name output in '[PATCH]' format.
--start-number ::
Start numbering the patches at instead of 1.
--numbered-files::
Output file names will be a simple number sequence
without the default first line of the commit appended.
-k::
--keep-subject::
Do not strip/add '[PATCH]' from the first line of the
commit log message.
-s::
--signoff::
Add `Signed-off-by:` line to the commit message, using
the committer identity of yourself.
--stdout::
Print all commits to the standard output in mbox format,
instead of creating a file for each one.
--attach[=]::
Create multipart/mixed attachment, the first part of
which is the commit message and the patch itself in the
second part, with "Content-Disposition: attachment".
--no-attach::
Disable the creation of an attachment, overriding the
configuration setting.
--inline[=]::
Create multipart/mixed attachment, the first part of
which is the commit message and the patch itself in the
second part, with "Content-Disposition: inline".
--thread[=