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.4.5" />
7 <title>git-send-email(
1)
</title>
8 <style type=
"text/css">
10 p
, li
, dt
, dd
, div
, pre
, h1
, h2
, h3
, h4
, h5
, h6
{
12 border: 1px solid red;
17 margin: 1em 5% 1em 5%;
22 text-decoration: underline
;
42 h1
, h2
, h3
, h4
, h5
, h6
{
44 font-family: sans-serif
;
51 border-bottom: 2px solid silver
;
69 border: 1px solid silver
;
88 font-family: sans-serif
;
94 span#revnumber
, span#revdate
, span#revremark
{
95 font-family: sans-serif
;
99 font-family: sans-serif
;
101 border-top: 2px solid silver
;
107 padding-bottom: 0.5em;
111 padding-bottom: 0.5em;
116 margin-bottom: 1.5em;
118 div
.tableblock
, div
.imageblock
, div
.exampleblock
, div
.verseblock
,
119 div
.quoteblock
, div
.literalblock
, div
.listingblock
, div
.sidebarblock
,
120 div
.admonitionblock
{
122 margin-bottom: 1.5em;
124 div
.admonitionblock
{
126 margin-bottom: 2.5em;
129 div
.content
{ /* Block element content. */
133 /* Block element titles. */
134 div
.title
, caption
.title
{
136 font-family: sans-serif
;
140 margin-bottom: 0.5em;
146 td div
.title:first-child
{
149 div
.content div
.title:first-child
{
152 div
.content
+ div
.title
{
156 div
.sidebarblock
> div
.content
{
158 border: 1px solid silver
;
162 div
.listingblock
> div
.content
{
163 border: 1px solid silver
;
172 div
.quoteblock
> div
.attribution
{
181 div
.verseblock
> div
.content
{
184 div
.verseblock
> div
.attribution
{
188 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189 div
.verseblock
+ div
.attribution
{
193 div
.admonitionblock
.icon
{
197 text-decoration: underline
;
199 padding-right: 0.5em;
201 div
.admonitionblock td
.content
{
203 border-left: 2px solid silver
;
206 div
.exampleblock
> div
.content
{
207 border-left: 2px solid silver
;
211 div
.imageblock div
.content
{ padding-left: 0; }
212 span
.image img
{ border-style: none
; }
213 a
.image:visited
{ color: white
; }
217 margin-bottom: 0.8em;
230 list-style-position: outside
;
233 list-style-type: decimal
;
236 list-style-type: lower-alpha
;
239 list-style-type: upper-alpha
;
242 list-style-type: lower-roman
;
245 list-style-type: upper-roman
;
248 div
.compact ul
, div
.compact ol
,
249 div
.compact p
, div
.compact p
,
250 div
.compact div
, div
.compact div
{
252 margin-bottom: 0.1em;
255 div
.tableblock
> table
{
256 border: 3px solid
#527bbd;
259 font-family: sans-serif
;
271 /* Because the table frame attribute is overriden by CSS in most browsers. */
272 div
.tableblock
> table
[frame
="void"] {
275 div
.tableblock
> table
[frame
="hsides"] {
276 border-left-style: none
;
277 border-right-style: none
;
279 div
.tableblock
> table
[frame
="vsides"] {
280 border-top-style: none
;
281 border-bottom-style: none
;
287 margin-bottom: 0.8em;
290 padding-bottom: 15px;
292 dt
.hdlist1
.strong
, td
.hdlist1
.strong
{
298 padding-right: 0.8em;
304 div
.hdlist
.compact tr
{
314 div#footer-badges
{ display: none
; }
319 font-family: sans-serif
;
323 margin-bottom: 0.1em;
326 div
.toclevel1
, div
.toclevel2
, div
.toclevel3
, div
.toclevel4
{
342 /* Overrides for manpage documents */
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver
;
347 border-bottom: 2px solid silver
;
357 div#toc
{ display: none
; }
360 /* Workarounds for IE6's broken and incomplete CSS2. */
362 div
.sidebar-content
{
364 border: 1px solid silver
;
367 div
.sidebar-title
, div
.image-title
{
369 font-family: sans-serif
;
372 margin-bottom: 0.5em;
375 div
.listingblock div
.content
{
376 border: 1px solid silver
;
381 div
.quoteblock-attribution
{
386 div
.verseblock-content
{
389 div
.verseblock-attribution
{
394 div
.exampleblock-content
{
395 border-left: 2px solid silver
;
399 /* IE6 sets dynamically generated links as visited. */
400 div#toc
a:visited
{ color: blue
; }
406 git-send-email(
1) Manual Page
409 <div class=
"sectionbody">
411 Send a collection of patches as emails
415 <h2 id=
"_synopsis">SYNOPSIS
</h2>
416 <div class=
"sectionbody">
417 <div class=
"paragraph"><p><em>git send-email
</em> [options]
<file|directory|rev-list options
>…</p></div>
419 <h2 id=
"_description">DESCRIPTION
</h2>
420 <div class=
"sectionbody">
421 <div class=
"paragraph"><p>Takes the patches given on the command line and emails them out.
422 Patches can be specified as files, directories (which will send all
423 files in the directory), or directly as a revision list. In the
424 last case, any format accepted by
<a href=
"git-format-patch.html">git-format-patch(
1)
</a> can
425 be passed to git send-email.
</p></div>
426 <div class=
"paragraph"><p>The header of the email is configurable by command line options. If not
427 specified on the command line, the user will be prompted with a ReadLine
428 enabled interface to provide the necessary information.
</p></div>
429 <div class=
"paragraph"><p>There are two formats accepted for patch files:
</p></div>
430 <div class=
"olist arabic"><ol class=
"arabic">
435 <div class=
"paragraph"><p>This is what
<a href=
"git-format-patch.html">git-format-patch(
1)
</a> generates. Most headers and MIME
436 formatting are ignored.
</p></div>
440 The original format used by Greg Kroah-Hartman
’s
<em>send_lots_of_email.pl
</em>
443 <div class=
"paragraph"><p>This format expects the first line of the file to contain the
"Cc:" value
444 and the
"Subject:" of the message as the second line.
</p></div>
448 <h2 id=
"_options">OPTIONS
</h2>
449 <div class=
"sectionbody">
450 <h3 id=
"_composing">Composing
</h3><div style=
"clear:left"></div>
451 <div class=
"dlist"><dl>
457 Review and edit each patch you
’re about to send. See the
458 CONFIGURATION section for
<em>sendemail.multiedit
</em>.
462 --bcc=
<address
>
466 Specify a
"Bcc:" value for each email. Default is the value of
467 <em>sendemail.bcc
</em>.
469 <div class=
"paragraph"><p>The --bcc option must be repeated for each user you want on the bcc list.
</p></div>
476 Specify a starting
"Cc:" value for each email.
477 Default is the value of
<em>sendemail.cc
</em>.
479 <div class=
"paragraph"><p>The --cc option must be repeated for each user you want on the cc list.
</p></div>
486 Invoke a text editor (see GIT_EDITOR in
<a href=
"git-var.html">git-var(
1)
</a>)
487 to edit an introductory message for the patch series.
489 <div class=
"paragraph"><p>When
<em>--compose
</em> is used, git send-email will use the From, Subject, and
490 In-Reply-To headers specified in the message. If the body of the message
491 (what you type after the headers and a blank line) only contains blank
492 (or GIT: prefixed) lines the summary won
’t be sent, but From, Subject,
493 and In-Reply-To headers will be used unless they are removed.
</p></div>
494 <div class=
"paragraph"><p>Missing From or In-Reply-To headers will be prompted for.
</p></div>
495 <div class=
"paragraph"><p>See the CONFIGURATION section for
<em>sendemail.multiedit
</em>.
</p></div>
498 --from=
<address
>
502 Specify the sender of the emails. If not specified on the command line,
503 the value of the
<em>sendemail.from
</em> configuration option is used. If
504 neither the command line option nor
<em>sendemail.from
</em> are set, then the
505 user will be prompted for the value. The default for the prompt will be
506 the value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not
507 set, as returned by
"git var -l".
511 --in-reply-to=
<identifier
>
515 Make the first mail (or all the mails with
<tt>--no-thread
</tt>) appear as a
516 reply to the given Message-Id, which avoids breaking threads to
517 provide a new patch series.
518 The second and subsequent emails will be sent as replies according to
519 the
<tt>--[no]-chain-reply-to
</tt> setting.
521 <div class=
"paragraph"><p>So for example when
<tt>--thread
</tt> and
<tt>--no-chain-reply-to
</tt> are specified, the
522 second and subsequent patches will be replies to the first one like in the
523 illustration below where
<tt>[PATCH v2
0/
3]
</tt> is in reply to
<tt>[PATCH
0/
2]
</tt>:
</p></div>
524 <div class=
"literalblock">
525 <div class=
"content">
526 <pre><tt>[PATCH
0/
2] Here is what I did...
527 [PATCH
1/
2] Clean up and tests
528 [PATCH
2/
2] Implementation
529 [PATCH v2
0/
3] Here is a reroll
530 [PATCH v2
1/
3] Clean up
531 [PATCH v2
2/
3] New tests
532 [PATCH v2
3/
3] Implementation
</tt></pre>
534 <div class=
"paragraph"><p>Only necessary if --compose is also set. If --compose
535 is not set, this will be prompted for.
</p></div>
538 --subject=
<string
>
542 Specify the initial subject of the email thread.
543 Only necessary if --compose is also set. If --compose
544 is not set, this will be prompted for.
552 Specify the primary recipient of the emails generated. Generally, this
553 will be the upstream maintainer of the project involved. Default is the
554 value of the
<em>sendemail.to
</em> configuration value; if that is unspecified,
555 and --to-cmd is not specified, this will be prompted for.
557 <div class=
"paragraph"><p>The --to option must be repeated for each user you want on the to list.
</p></div>
560 --
8bit-encoding=
<encoding
>
564 When encountering a non-ASCII message or subject that does not
565 declare its encoding, add headers/quoting to indicate it is
566 encoded in
<encoding
>. Default is the value of the
567 <em>sendemail.assume8bitEncoding
</em>; if that is unspecified, this
568 will be prompted for if any non-ASCII files are encountered.
570 <div class=
"paragraph"><p>Note that no attempts whatsoever are made to validate the encoding.
</p></div>
573 <h3 id=
"_sending">Sending
</h3><div style=
"clear:left"></div>
574 <div class=
"dlist"><dl>
576 --envelope-sender=
<address
>
580 Specify the envelope sender used to send the emails.
581 This is useful if your default address is not the address that is
582 subscribed to a list. In order to use the
<em>From
</em> address, set the
583 value to
"auto". If you use the sendmail binary, you must have
584 suitable privileges for the -f parameter. Default is the value of the
585 <em>sendemail.envelopesender
</em> configuration variable; if that is
586 unspecified, choosing the envelope sender is left to your MTA.
590 --smtp-encryption=
<encryption
>
594 Specify the encryption to use, either
<em>ssl
</em> or
<em>tls
</em>. Any other
595 value reverts to plain SMTP. Default is the value of
596 <em>sendemail.smtpencryption
</em>.
600 --smtp-domain=
<FQDN
>
604 Specifies the Fully Qualified Domain Name (FQDN) used in the
605 HELO/EHLO command to the SMTP server. Some servers require the
606 FQDN to match your IP address. If not set, git send-email attempts
607 to determine your FQDN automatically. Default is the value of
608 <em>sendemail.smtpdomain
</em>.
612 --smtp-pass[=
<password
>]
616 Password for SMTP-AUTH. The argument is optional: If no
617 argument is specified, then the empty string is used as
618 the password. Default is the value of
<em>sendemail.smtppass
</em>,
619 however
<em>--smtp-pass
</em> always overrides this value.
621 <div class=
"paragraph"><p>Furthermore, passwords need not be specified in configuration files
622 or on the command line. If a username has been specified (with
623 <em>--smtp-user
</em> or a
<em>sendemail.smtpuser
</em>), but no password has been
624 specified (with
<em>--smtp-pass
</em> or
<em>sendemail.smtppass
</em>), then the
625 user is prompted for a password while the input is masked for privacy.
</p></div>
628 --smtp-server=
<host
>
632 If set, specifies the outgoing SMTP server to use (e.g.
633 <tt>smtp.example.com
</tt> or a raw IP address). Alternatively it can
634 specify a full pathname of a sendmail-like program instead;
635 the program must support the
<tt>-i
</tt> option. Default value can
636 be specified by the
<em>sendemail.smtpserver
</em> configuration
637 option; the built-in default is
<tt>/usr/sbin/sendmail
</tt> or
638 <tt>/usr/lib/sendmail
</tt> if such program is available, or
639 <tt>localhost
</tt> otherwise.
643 --smtp-server-port=
<port
>
647 Specifies a port different from the default port (SMTP
648 servers typically listen to smtp port
25, but may also listen to
649 submission port
587, or the common SSL smtp port
465);
650 symbolic port names (e.g.
"submission" instead of
587)
651 are also accepted. The port can also be set with the
652 <em>sendemail.smtpserverport
</em> configuration variable.
656 --smtp-server-option=
<option
>
660 If set, specifies the outgoing SMTP server option to use.
661 Default value can be specified by the
<em>sendemail.smtpserveroption
</em>
662 configuration option.
664 <div class=
"paragraph"><p>The --smtp-server-option option must be repeated for each option you want
665 to pass to the server. Likewise, different lines in the configuration files
666 must be used for each option.
</p></div>
673 Legacy alias for
<em>--smtp-encryption ssl
</em>.
677 --smtp-user=
<user
>
681 Username for SMTP-AUTH. Default is the value of
<em>sendemail.smtpuser
</em>;
682 if a username is not specified (with
<em>--smtp-user
</em> or
<em>sendemail.smtpuser
</em>),
683 then authentication is not attempted.
687 <h3 id=
"_automating">Automating
</h3><div style=
"clear:left"></div>
688 <div class=
"dlist"><dl>
690 --to-cmd=
<command
>
694 Specify a command to execute once per patch file which
695 should generate patch file specific
"To:" entries.
696 Output of this command must be single email address per line.
697 Default is the value of
<em>sendemail.tocmd
</em> configuration value.
701 --cc-cmd=
<command
>
705 Specify a command to execute once per patch file which
706 should generate patch file specific
"Cc:" entries.
707 Output of this command must be single email address per line.
708 Default is the value of
<em>sendemail.cccmd
</em> configuration value.
712 --[no-]chain-reply-to
716 If this is set, each email will be sent as a reply to the previous
717 email sent. If disabled with
"--no-chain-reply-to", all emails after
718 the first will be sent as replies to the first email sent. When using
719 this, it is recommended that the first file given be an overview of the
720 entire patch series. Disabled by default, but the
<em>sendemail.chainreplyto
</em>
721 configuration variable can be used to enable it.
725 --identity=
<identity
>
729 A configuration identity. When given, causes values in the
730 <em>sendemail.
<identity
></em> subsection to take precedence over
731 values in the
<em>sendemail
</em> section. The default identity is
732 the value of
<em>sendemail.identity
</em>.
736 --[no-]signed-off-by-cc
740 If this is set, add emails found in Signed-off-by: or Cc: lines to the
741 cc list. Default is the value of
<em>sendemail.signedoffbycc
</em> configuration
742 value; if that is unspecified, default to --signed-off-by-cc.
746 --suppress-cc=
<category
>
750 Specify an additional category of recipients to suppress the
753 <div class=
"ulist"><ul>
756 <em>author
</em> will avoid including the patch author
761 <em>self
</em> will avoid including the sender
766 <em>cc
</em> will avoid including anyone mentioned in Cc lines in the patch header
767 except for self (use
<em>self
</em> for that).
772 <em>bodycc
</em> will avoid including anyone mentioned in Cc lines in the
773 patch body (commit message) except for self (use
<em>self
</em> for that).
778 <em>sob
</em> will avoid including anyone mentioned in Signed-off-by lines except
779 for self (use
<em>self
</em> for that).
784 <em>cccmd
</em> will avoid running the --cc-cmd.
789 <em>body
</em> is equivalent to
<em>sob
</em> +
<em>bodycc
</em>
794 <em>all
</em> will suppress all auto cc values.
798 <div class=
"paragraph"><p>Default is the value of
<em>sendemail.suppresscc
</em> configuration value; if
799 that is unspecified, default to
<em>self
</em> if --suppress-from is
800 specified, as well as
<em>body
</em> if --no-signed-off-cc is specified.
</p></div>
807 If this is set, do not add the From: address to the cc: list.
808 Default is the value of
<em>sendemail.suppressfrom
</em> configuration
809 value; if that is unspecified, default to --no-suppress-from.
817 If this is set, the In-Reply-To and References headers will be
818 added to each email sent. Whether each mail refers to the
819 previous email (
<tt>deep
</tt> threading per
<em>git format-patch
</em>
820 wording) or to the first email (
<tt>shallow
</tt> threading) is
821 governed by
"--[no-]chain-reply-to".
823 <div class=
"paragraph"><p>If disabled with
"--no-thread", those headers will not be added
824 (unless specified with --in-reply-to). Default is the value of the
825 <em>sendemail.thread
</em> configuration value; if that is unspecified,
826 default to --thread.
</p></div>
827 <div class=
"paragraph"><p>It is up to the user to ensure that no In-Reply-To header already
828 exists when
<em>git send-email
</em> is asked to add it (especially note that
829 <em>git format-patch
</em> can be configured to do the threading itself).
830 Failure to do so may not produce the expected result in the
831 recipient
’s MUA.
</p></div>
834 <h3 id=
"_administering">Administering
</h3><div style=
"clear:left"></div>
835 <div class=
"dlist"><dl>
837 --confirm=
<mode
>
841 Confirm just before sending:
843 <div class=
"ulist"><ul>
846 <em>always
</em> will always confirm before sending
851 <em>never
</em> will never confirm before sending
856 <em>cc
</em> will confirm before sending when send-email has automatically
857 added addresses from the patch to the Cc list
862 <em>compose
</em> will confirm before sending the first message when using --compose.
867 <em>auto
</em> is equivalent to
<em>cc
</em> +
<em>compose
</em>
871 <div class=
"paragraph"><p>Default is the value of
<em>sendemail.confirm
</em> configuration value; if that
872 is unspecified, default to
<em>auto
</em> unless any of the suppress options
873 have been specified, in which case default to
<em>compose
</em>.
</p></div>
880 Do everything except actually send the emails.
888 When an argument may be understood either as a reference or as a file name,
889 choose to understand it as a format-patch argument (
<em>--format-patch
</em>)
890 or as a file name (
<em>--no-format-patch
</em>). By default, when such a conflict
891 occurs, git send-email will fail.
899 Make git-send-email less verbose. One line per email should be
908 Perform sanity checks on patches.
909 Currently, validation means the following:
911 <div class=
"ulist"><ul>
914 Warn of patches that contain lines longer than
998 characters; this
915 is due to SMTP limits as described by
<a href=
"http://www.ietf.org/rfc/rfc2821.txt">http://www.ietf.org/rfc/rfc2821.txt
</a>.
919 <div class=
"paragraph"><p>Default is the value of
<em>sendemail.validate
</em>; if this is not set,
920 default to
<em>--validate
</em>.
</p></div>
927 Send emails even if safety checks would prevent it.
932 <h2 id=
"_configuration">CONFIGURATION
</h2>
933 <div class=
"sectionbody">
934 <div class=
"dlist"><dl>
936 sendemail.aliasesfile
940 To avoid typing long email addresses, point this to one or more
941 email aliases files. You must also supply
<em>sendemail.aliasfiletype
</em>.
945 sendemail.aliasfiletype
949 Format of the file(s) specified in sendemail.aliasesfile. Must be
950 one of
<em>mutt
</em>,
<em>mailrc
</em>,
<em>pine
</em>,
<em>elm
</em>, or
<em>gnus
</em>.
958 If true (default), a single editor instance will be spawned to edit
959 files you have to edit (patches when
<em>--annotate
</em> is used, and the
960 summary when
<em>--compose
</em> is used). If false, files will be edited one
961 after the other, spawning a new editor each time.
969 Sets the default for whether to confirm before sending. Must be
970 one of
<em>always
</em>,
<em>never
</em>,
<em>cc
</em>,
<em>compose
</em>, or
<em>auto
</em>. See
<em>--confirm
</em>
971 in the previous section for the meaning of these values.
976 <h2 id=
"_example">EXAMPLE
</h2>
977 <div class=
"sectionbody">
978 <h3 id=
"_use_gmail_as_the_smtp_server">Use gmail as the smtp server
</h3><div style=
"clear:left"></div>
979 <div class=
"paragraph"><p>To use
<em>git send-email
</em> to send your patches through the GMail SMTP server,
980 edit ~/.gitconfig to specify your account settings:
</p></div>
981 <div class=
"literalblock">
982 <div class=
"content">
985 smtpserver = smtp.gmail.com
986 smtpuser = yourname@gmail.com
987 smtpserverport =
587</tt></pre>
989 <div class=
"paragraph"><p>Once your commits are ready to be sent to the mailing list, run the
990 following commands:
</p></div>
991 <div class=
"literalblock">
992 <div class=
"content">
993 <pre><tt>$ git format-patch --cover-letter -M origin/master -o outgoing/
994 $ edit outgoing/
0000-*
995 $ git send-email outgoing/*
</tt></pre>
997 <div class=
"paragraph"><p>Note: the following perl modules are required
998 Net::SMTP::SSL, MIME::Base64 and Authen::SASL
</p></div>
1000 <h2 id=
"_see_also">SEE ALSO
</h2>
1001 <div class=
"sectionbody">
1002 <div class=
"paragraph"><p><a href=
"git-format-patch.html">git-format-patch(
1)
</a>,
<a href=
"git-imap-send.html">git-imap-send(
1)
</a>, mbox(
5)
</p></div>
1004 <h2 id=
"_git">GIT
</h2>
1005 <div class=
"sectionbody">
1006 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
1009 <div id=
"footer-text">
1010 Last updated
2011-
05-
05 01:
29:
54 UTC