SYNOPSIS
--------
-[verse]
-'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]verify]
+[synopsis]
+git am [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]verify]
[--[no-]3way] [--interactive] [--committer-date-is-author-date]
[--ignore-date] [--ignore-space-change | --ignore-whitespace]
[--whitespace=<action>] [-C<n>] [-p<n>] [--directory=<dir>]
[--exclude=<path>] [--include=<path>] [--reject] [-q | --quiet]
- [--[no-]scissors] [-S[<keyid>]] [--patch-format=<format>]
+ [--[no-]scissors] [-S[<key-id>]] [--patch-format=<format>]
[--quoted-cr=<action>]
[--empty=(stop|drop|keep)]
[(<mbox> | <Maildir>)...]
-'git am' (--continue | --skip | --abort | --quit | --retry | --show-current-patch[=(diff|raw)] | --allow-empty)
+git am (--continue | --skip | --abort | --quit | --retry | --show-current-patch[=(diff|raw)] | --allow-empty)
DESCRIPTION
-----------
OPTIONS
-------
-(<mbox>|<Maildir>)...::
+`(<mbox>|<Maildir>)...`::
The list of mailbox files to read patches from. If you do not
supply this argument, the command reads from the standard input.
If you supply directories, they will be treated as Maildirs.
--s::
---signoff::
+`-s`::
+`--signoff`::
Add a `Signed-off-by` trailer to the commit message (see
linkgit:git-interpret-trailers[1]), using the committer identity
of yourself. See the signoff option in linkgit:git-commit[1]
for more information.
--k::
---keep::
+`-k`::
+`--keep`::
Pass `-k` flag to linkgit:git-mailinfo[1].
---keep-non-patch::
+`--keep-non-patch`::
Pass `-b` flag to linkgit:git-mailinfo[1].
---keep-cr::
---no-keep-cr::
+`--keep-cr`::
+`--no-keep-cr`::
With `--keep-cr`, call linkgit:git-mailsplit[1]
with the same option, to prevent it from stripping CR at the end of
lines. `am.keepcr` configuration variable can be used to specify the
default behaviour. `--no-keep-cr` is useful to override `am.keepcr`.
--c::
---scissors::
+`-c`::
+`--scissors`::
Remove everything in body before a scissors line (see
linkgit:git-mailinfo[1]). Can be activated by default using
the `mailinfo.scissors` configuration variable.
---no-scissors::
+`--no-scissors`::
Ignore scissors lines (see linkgit:git-mailinfo[1]).
---quoted-cr=<action>::
+`--quoted-cr=<action>`::
This flag will be passed down to linkgit:git-mailinfo[1].
---empty=(drop|keep|stop)::
+`--empty=(drop|keep|stop)`::
How to handle an e-mail message lacking a patch:
+
--
session. This is the default behavior.
--
--m::
---message-id::
+`-m`::
+`--message-id`::
Pass the `-m` flag to linkgit:git-mailinfo[1],
so that the `Message-ID` header is added to the commit message.
The `am.messageid` configuration variable can be used to specify
the default behaviour.
---no-message-id::
+`--no-message-id`::
Do not add the Message-ID header to the commit message.
`--no-message-id` is useful to override `am.messageid`.
--q::
---quiet::
+`-q`::
+`--quiet`::
Be quiet. Only print error messages.
--u::
---utf8::
+`-u`::
+`--utf8`::
Pass `-u` flag to linkgit:git-mailinfo[1].
The proposed commit log message taken from the e-mail
is re-coded into UTF-8 encoding (configuration variable
This was optional in prior versions of git, but now it is the
default. You can use `--no-utf8` to override this.
---no-utf8::
+`--no-utf8`::
Pass `-n` flag to linkgit:git-mailinfo[1].
--3::
---3way::
---no-3way::
+`-3`::
+`--3way`::
+`--no-3way`::
When the patch does not apply cleanly, fall back on
3-way merge if the patch records the identity of blobs
it is supposed to apply to and we have those blobs
available locally. `--no-3way` can be used to override
- am.threeWay configuration variable. For more information,
- see am.threeWay in linkgit:git-config[1].
+ `am.threeWay` configuration variable. For more information,
+ see `am.threeWay` in linkgit:git-config[1].
include::rerere-options.adoc[]
---ignore-space-change::
---ignore-whitespace::
---whitespace=<action>::
--C<n>::
--p<n>::
---directory=<dir>::
---exclude=<path>::
---include=<path>::
---reject::
+`--ignore-space-change`::
+`--ignore-whitespace`::
+`--whitespace=<action>`::
+`-C<n>`::
+`-p<n>`::
+`--directory=<dir>`::
+`--exclude=<path>`::
+`--include=<path>`::
+`--reject`::
These flags are passed to the linkgit:git-apply[1] program that
applies the patch.
+
-Valid <action> for the `--whitespace` option are:
+Valid _<action>_ for the `--whitespace` option are:
`nowarn`, `warn`, `fix`, `error`, and `error-all`.
---patch-format::
+`--patch-format`::
By default the command will try to detect the patch format
automatically. This option allows the user to bypass the automatic
detection and specify the patch format that the patch(es) should be
interpreted as. Valid formats are mbox, mboxrd,
stgit, stgit-series, and hg.
--i::
---interactive::
+`-i`::
+`--interactive`::
Run interactively.
---verify::
--n::
---no-verify::
+`--verify`::
+`-n`::
+`--no-verify`::
Run the `pre-applypatch` and `applypatch-msg` hooks. This is the
default. Skip these hooks with `-n` or `--no-verify`. See also
linkgit:githooks[5].
+
Note that `post-applypatch` cannot be skipped.
---committer-date-is-author-date::
+`--committer-date-is-author-date`::
By default the command records the date from the e-mail
message as the commit author date, and uses the time of
commit creation as the committer date. This allows the
older (in terms of the commit date) than the oldest patch you are
applying.
---ignore-date::
+`--ignore-date`::
By default the command records the date from the e-mail
message as the commit author date, and uses the time of
commit creation as the committer date. This allows the
user to lie about the author date by using the same
value as the committer date.
---skip::
+`--skip`::
Skip the current patch. This is only meaningful when
restarting an aborted patch.
--S[<keyid>]::
---gpg-sign[=<keyid>]::
---no-gpg-sign::
- GPG-sign commits. The `keyid` argument is optional and
+`-S[<key-id>]`::
+`--gpg-sign[=<key-id>]`::
+`--no-gpg-sign`::
+ GPG-sign commits. The _<key-id>_ is optional and
defaults to the committer identity; if specified, it must be
stuck to the option without a space. `--no-gpg-sign` is useful to
countermand both `commit.gpgSign` configuration variable, and
earlier `--gpg-sign`.
---continue::
--r::
---resolved::
+`--continue`::
+`-r`::
+`--resolved`::
After a patch failure (e.g. attempting to apply
conflicting patch), the user has applied it by hand and
the index file stores the result of the application.
extracted from the e-mail message and the current index
file, and continue.
---resolvemsg=<msg>::
- When a patch failure occurs, <msg> will be printed
+`--resolvemsg=<msg>`::
+ When a patch failure occurs, _<msg>_ will be printed
to the screen before exiting. This overrides the
standard message informing you to use `--continue`
or `--skip` to handle the failure. This is solely
for internal use between linkgit:git-rebase[1] and
linkgit:git-am[1].
---abort::
+`--abort`::
Restore the original branch and abort the patching operation.
Revert the contents of files involved in the am operation to their
pre-am state.
---quit::
- Abort the patching operation but keep HEAD and the index
+`--quit`::
+ Abort the patching operation but keep `HEAD` and the index
untouched.
---retry::
+`--retry`::
Try to apply the last conflicting patch again. This is generally
only useful for passing extra options to the retry attempt
(e.g., `--3way`), since otherwise you'll just see the same
failure again.
---show-current-patch[=(diff|raw)]::
+`--show-current-patch[=(diff|raw)]`::
Show the message at which linkgit:git-am[1] has stopped due to
conflicts. If `raw` is specified, show the raw contents of
the e-mail message; if `diff`, show the diff portion only.
Defaults to `raw`.
---allow-empty::
+`--allow-empty`::
After a patch failure on an input e-mail message lacking a patch,
create an empty commit with the contents of the e-mail message
as its log message.
run `git am --abort` before running the command with mailbox
names.
-Before any patches are applied, ORIG_HEAD is set to the tip of the
+Before any patches are applied, `ORIG_HEAD` is set to the tip of the
current branch. This is useful if you have problems with multiple
commits, like running linkgit:git-am[1] on the wrong branch or an error
in the commits that is more easily fixed by changing the mailbox (e.g.
-errors in the "From:" lines).
+errors in the `From:` lines).
[[caveats]]
CAVEATS