1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
6 <meta name=
"generator" content=
"AsciiDoc 8.2.5" />
7 <style type=
"text/css">
9 p
, li
, dt
, dd
, div
, pre
, h1
, h2
, h3
, h4
, h5
, h6
{
11 border: 1px solid red;
16 margin: 1em 5% 1em 5%;
21 text-decoration: underline
;
39 h1
, h2
, h3
, h4
, h5
, h6
{
41 font-family: sans-serif
;
48 border-bottom: 2px solid silver
;
66 border: 1px solid silver
;
81 font-family: sans-serif
;
88 font-family: sans-serif
;
92 font-family: sans-serif
;
94 border-top: 2px solid silver
;
100 padding-bottom: 0.5em;
104 padding-bottom: 0.5em;
108 div
.tableblock
, div
.imageblock
, div
.exampleblock
, div
.verseblock
,
109 div
.quoteblock
, div
.literalblock
, div
.listingblock
, div
.sidebarblock
,
110 div
.admonitionblock
{
113 margin-bottom: 1.5em;
115 div
.admonitionblock
{
117 margin-bottom: 2.5em;
120 div
.content
{ /* Block element content. */
124 /* Block element titles. */
125 div
.title
, caption
.title
{
126 font-family: sans-serif
;
130 margin-bottom: 0.5em;
136 td div
.title:first-child
{
139 div
.content div
.title:first-child
{
142 div
.content
+ div
.title
{
146 div
.sidebarblock
> div
.content
{
148 border: 1px solid silver
;
155 div
.listingblock
> div
.content
{
156 border: 1px solid silver
;
161 div
.quoteblock
> div
.content
{
168 div
.verseblock
+ div
.attribution
{
172 div
.admonitionblock
.icon
{
176 text-decoration: underline
;
178 padding-right: 0.5em;
180 div
.admonitionblock td
.content
{
182 border-left: 2px solid silver
;
185 div
.exampleblock
> div
.content
{
186 border-left: 2px solid silver
;
190 div
.verseblock div
.content
{
194 div
.imageblock div
.content
{ padding-left: 0; }
195 div
.imageblock img
{ border: 1px solid silver
; }
196 span
.image img
{ border-style: none
; }
200 margin-bottom: 0.8em;
212 list-style-position: outside
;
215 list-style-type: lower-alpha
;
218 div
.tableblock
> table
{
219 border: 3px solid
#527bbd;
222 font-family: sans-serif
;
231 margin-bottom: 0.8em;
239 padding-right: 0.8em;
246 div#footer-badges
{ display: none
; }
251 font-family: sans-serif
;
255 margin-bottom: 0.1em;
258 div
.toclevel1
, div
.toclevel2
, div
.toclevel3
, div
.toclevel4
{
274 include1::./stylesheets
/xhtml11-manpage
.css
[]
275 /* Workarounds for IE6's broken and incomplete CSS2. */
277 div
.sidebar-content
{
279 border: 1px solid silver
;
282 div
.sidebar-title
, div
.image-title
{
283 font-family: sans-serif
;
286 margin-bottom: 0.5em;
289 div
.listingblock div
.content
{
290 border: 1px solid silver
;
295 div
.quoteblock-content
{
299 div
.exampleblock-content
{
300 border-left: 2px solid silver
;
304 /* IE6 sets dynamically generated links as visited. */
305 div#toc
a:visited
{ color: blue
; }
307 <title>git-am(
1)
</title>
312 git-am(
1) Manual Page
315 <div class=
"sectionbody">
317 Apply a series of patches from a mailbox
322 <div class=
"sectionbody">
323 <div class=
"verseblock">
324 <div class=
"content"><em>git am
</em> [--signoff] [--keep] [--utf8 | --no-utf8]
325 [--
3way] [--interactive] [--committer-date-is-author-date]
326 [--ignore-date] [--ignore-space-change | --ignore-whitespace]
327 [--whitespace=
<option
>] [-C
<n
>] [-p
<n
>] [--directory=
<dir
>]
328 [--reject] [-q | --quiet] [--scissors | --no-scissors]
329 [
<mbox
> |
<Maildir
>…]
330 <em>git am
</em> (--skip | --resolved | --abort)
</div></div>
332 <h2 id=
"_description">DESCRIPTION
</h2>
333 <div class=
"sectionbody">
334 <div class=
"para"><p>Splits mail messages in a mailbox into commit log message,
335 authorship information and patches, and applies them to the
336 current branch.
</p></div>
338 <h2 id=
"_options">OPTIONS
</h2>
339 <div class=
"sectionbody">
340 <div class=
"vlist"><dl>
342 <mbox
>|
<Maildir
>…
346 The list of mailbox files to read patches from. If you do not
347 supply this argument, the command reads from the standard input.
348 If you supply directories, they will be treated as Maildirs.
359 Add a
<tt>Signed-off-by:
</tt> line to the commit message, using
360 the committer identity of yourself.
371 Pass
<tt>-k
</tt> flag to
<em>git mailinfo
</em> (see
<a href=
"git-mailinfo.html">git-mailinfo(
1)
</a>).
382 Remove everything in body before a scissors line (see
383 <a href=
"git-mailinfo.html">git-mailinfo(
1)
</a>).
391 Ignore scissors lines (see
<a href=
"git-mailinfo.html">git-mailinfo(
1)
</a>).
402 Be quiet. Only print error messages.
413 Pass
<tt>-u
</tt> flag to
<em>git mailinfo
</em> (see
<a href=
"git-mailinfo.html">git-mailinfo(
1)
</a>).
414 The proposed commit log message taken from the e-mail
415 is re-coded into UTF-
8 encoding (configuration variable
416 <tt>i18n.commitencoding
</tt> can be used to specify project's
417 preferred encoding if it is not UTF-
8).
419 <div class=
"para"><p>This was optional in prior versions of git, but now it is the
420 default. You can use
<tt>--no-utf8
</tt> to override this.
</p></div>
427 Pass
<tt>-n
</tt> flag to
<em>git mailinfo
</em> (see
428 <a href=
"git-mailinfo.html">git-mailinfo(
1)
</a>).
439 When the patch does not apply cleanly, fall back on
440 3-way merge if the patch records the identity of blobs
441 it is supposed to apply to and we have those blobs
449 --ignore-space-change
455 --whitespace=
<option
>
464 --directory=
<dir
>
471 These flags are passed to the
<em>git apply
</em> (see
<a href=
"git-apply.html">git-apply(
1)
</a>)
488 --committer-date-is-author-date
492 By default the command records the date from the e-mail
493 message as the commit author date, and uses the time of
494 commit creation as the committer date. This allows the
495 user to lie about the committer date by using the same
496 value as the author date.
504 By default the command records the date from the e-mail
505 message as the commit author date, and uses the time of
506 commit creation as the committer date. This allows the
507 user to lie about the author date by using the same
508 value as the committer date.
516 Skip the current patch. This is only meaningful when
517 restarting an aborted patch.
528 After a patch failure (e.g. attempting to apply
529 conflicting patch), the user has applied it by hand and
530 the index file stores the result of the application.
531 Make a commit using the authorship and commit log
532 extracted from the e-mail message and the current index
537 --resolvemsg=
<msg
>
541 When a patch failure occurs,
<msg
> will be printed
542 to the screen before exiting. This overrides the
543 standard message informing you to use
<tt>--resolved
</tt>
544 or
<tt>--skip
</tt> to handle the failure. This is solely
545 for internal use between
<em>git rebase
</em> and
<em>git am
</em>.
553 Restore the original branch and abort the patching operation.
558 <h2 id=
"_discussion">DISCUSSION
</h2>
559 <div class=
"sectionbody">
560 <div class=
"para"><p>The commit author name is taken from the
"From: " line of the
561 message, and commit author date is taken from the
"Date: " line
562 of the message. The
"Subject: " line is used as the title of
563 the commit, after stripping common prefix
"[PATCH <anything>]".
564 The
"Subject: " line is supposed to concisely describe what the
565 commit is about in one line of text.
</p></div>
566 <div class=
"para"><p>"From: " and
"Subject: " lines starting the body override the respective
567 commit author name and title values taken from the headers.
</p></div>
568 <div class=
"para"><p>The commit message is formed by the title taken from the
569 "Subject: ", a blank line and the body of the message up to
570 where the patch begins. Excess whitespace at the end of each
571 line is automatically stripped.
</p></div>
572 <div class=
"para"><p>The patch is expected to be inline, directly following the
573 message. Any line that is of the form:
</p></div>
574 <div class=
"ilist"><ul>
577 three-dashes and end-of-line, or
582 a line that begins with
"diff -", or
587 a line that begins with
"Index: "
591 <div class=
"para"><p>is taken as the beginning of a patch, and the commit log message
592 is terminated before the first occurrence of such a line.
</p></div>
593 <div class=
"para"><p>When initially invoking
<tt>git am
</tt>, you give it the names of the mailboxes
594 to process. Upon seeing the first patch that does not apply, it
595 aborts in the middle. You can recover from this in one of two ways:
</p></div>
596 <div class=
"olist"><ol>
599 skip the current patch by re-running the command with the
<em>--skip
</em>
605 hand resolve the conflict in the working directory, and update
606 the index file to bring it into a state that the patch should
607 have produced. Then run the command with the
<em>--resolved
</em> option.
611 <div class=
"para"><p>The command refuses to process new mailboxes while the
<tt>.git/rebase-apply
</tt>
612 directory exists, so if you decide to start over from scratch,
613 run
<tt>rm -f -r .git/rebase-apply
</tt> before running the command with mailbox
615 <div class=
"para"><p>Before any patches are applied, ORIG_HEAD is set to the tip of the
616 current branch. This is useful if you have problems with multiple
617 commits, like running
<em>git am
</em> on the wrong branch or an error in the
618 commits that is more easily fixed by changing the mailbox (e.g.
619 errors in the
"From:" lines).
</p></div>
621 <h2 id=
"_see_also">SEE ALSO
</h2>
622 <div class=
"sectionbody">
623 <div class=
"para"><p><a href=
"git-apply.html">git-apply(
1)
</a>.
</p></div>
625 <h2 id=
"_author">Author
</h2>
626 <div class=
"sectionbody">
627 <div class=
"para"><p>Written by Junio C Hamano
<gitster@pobox.com
></p></div>
629 <h2 id=
"_documentation">Documentation
</h2>
630 <div class=
"sectionbody">
631 <div class=
"para"><p>Documentation by Petr Baudis, Junio C Hamano and the git-list
<git@vger.kernel.org
>.
</p></div>
633 <h2 id=
"_git">GIT
</h2>
634 <div class=
"sectionbody">
635 <div class=
"para"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
638 <div id=
"footer-text">
639 Last updated
2010-
01-
21 17:
44:
21 UTC