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=
"verseblock">
418 <div class=
"verseblock-content"><em>git send-email
</em> [options]
<file|directory|rev-list options
>…</div>
419 <div class=
"verseblock-attribution">
422 <h2 id=
"_description">DESCRIPTION
</h2>
423 <div class=
"sectionbody">
424 <div class=
"paragraph"><p>Takes the patches given on the command line and emails them out.
425 Patches can be specified as files, directories (which will send all
426 files in the directory), or directly as a revision list. In the
427 last case, any format accepted by
<a href=
"git-format-patch.html">git-format-patch(
1)
</a> can
428 be passed to git send-email.
</p></div>
429 <div class=
"paragraph"><p>The header of the email is configurable by command line options. If not
430 specified on the command line, the user will be prompted with a ReadLine
431 enabled interface to provide the necessary information.
</p></div>
432 <div class=
"paragraph"><p>There are two formats accepted for patch files:
</p></div>
433 <div class=
"olist arabic"><ol class=
"arabic">
438 <div class=
"paragraph"><p>This is what
<a href=
"git-format-patch.html">git-format-patch(
1)
</a> generates. Most headers and MIME
439 formatting are ignored.
</p></div>
443 The original format used by Greg Kroah-Hartman
’s
<em>send_lots_of_email.pl
</em>
446 <div class=
"paragraph"><p>This format expects the first line of the file to contain the
"Cc:" value
447 and the
"Subject:" of the message as the second line.
</p></div>
451 <h2 id=
"_options">OPTIONS
</h2>
452 <div class=
"sectionbody">
453 <h3 id=
"_composing">Composing
</h3><div style=
"clear:left"></div>
454 <div class=
"dlist"><dl>
460 Review and edit each patch you
’re about to send. See the
461 CONFIGURATION section for
<em>sendemail.multiedit
</em>.
465 --bcc=
<address
>
469 Specify a
"Bcc:" value for each email. Default is the value of
470 <em>sendemail.bcc
</em>.
472 <div class=
"paragraph"><p>The --bcc option must be repeated for each user you want on the bcc list.
</p></div>
479 Specify a starting
"Cc:" value for each email.
480 Default is the value of
<em>sendemail.cc
</em>.
482 <div class=
"paragraph"><p>The --cc option must be repeated for each user you want on the cc list.
</p></div>
489 Invoke a text editor (see GIT_EDITOR in
<a href=
"git-var.html">git-var(
1)
</a>)
490 to edit an introductory message for the patch series.
492 <div class=
"paragraph"><p>When
<em>--compose
</em> is used, git send-email will use the From, Subject, and
493 In-Reply-To headers specified in the message. If the body of the message
494 (what you type after the headers and a blank line) only contains blank
495 (or GIT: prefixed) lines the summary won
’t be sent, but From, Subject,
496 and In-Reply-To headers will be used unless they are removed.
</p></div>
497 <div class=
"paragraph"><p>Missing From or In-Reply-To headers will be prompted for.
</p></div>
498 <div class=
"paragraph"><p>See the CONFIGURATION section for
<em>sendemail.multiedit
</em>.
</p></div>
501 --from=
<address
>
505 Specify the sender of the emails. If not specified on the command line,
506 the value of the
<em>sendemail.from
</em> configuration option is used. If
507 neither the command line option nor
<em>sendemail.from
</em> are set, then the
508 user will be prompted for the value. The default for the prompt will be
509 the value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not
510 set, as returned by
"git var -l".
514 --in-reply-to=
<identifier
>
518 Make the first mail (or all the mails with
<tt>--no-thread
</tt>) appear as a
519 reply to the given Message-Id, which avoids breaking threads to
520 provide a new patch series.
521 The second and subsequent emails will be sent as replies according to
522 the
<tt>--[no]-chain-reply-to
</tt> setting.
524 <div class=
"paragraph"><p>So for example when
<tt>--thread
</tt> and
<tt>--no-chain-reply-to
</tt> are specified, the
525 second and subsequent patches will be replies to the first one like in the
526 illustration below where
<tt>[PATCH v2
0/
3]
</tt> is in reply to
<tt>[PATCH
0/
2]
</tt>:
</p></div>
527 <div class=
"literalblock">
528 <div class=
"content">
529 <pre><tt>[PATCH
0/
2] Here is what I did...
530 [PATCH
1/
2] Clean up and tests
531 [PATCH
2/
2] Implementation
532 [PATCH v2
0/
3] Here is a reroll
533 [PATCH v2
1/
3] Clean up
534 [PATCH v2
2/
3] New tests
535 [PATCH v2
3/
3] Implementation
</tt></pre>
537 <div class=
"paragraph"><p>Only necessary if --compose is also set. If --compose
538 is not set, this will be prompted for.
</p></div>
541 --subject=
<string
>
545 Specify the initial subject of the email thread.
546 Only necessary if --compose is also set. If --compose
547 is not set, this will be prompted for.
555 Specify the primary recipient of the emails generated. Generally, this
556 will be the upstream maintainer of the project involved. Default is the
557 value of the
<em>sendemail.to
</em> configuration value; if that is unspecified,
558 and --to-cmd is not specified, this will be prompted for.
560 <div class=
"paragraph"><p>The --to option must be repeated for each user you want on the to list.
</p></div>
563 --
8bit-encoding=
<encoding
>
567 When encountering a non-ASCII message or subject that does not
568 declare its encoding, add headers/quoting to indicate it is
569 encoded in
<encoding
>. Default is the value of the
570 <em>sendemail.assume8bitEncoding
</em>; if that is unspecified, this
571 will be prompted for if any non-ASCII files are encountered.
573 <div class=
"paragraph"><p>Note that no attempts whatsoever are made to validate the encoding.
</p></div>
576 <h3 id=
"_sending">Sending
</h3><div style=
"clear:left"></div>
577 <div class=
"dlist"><dl>
579 --envelope-sender=
<address
>
583 Specify the envelope sender used to send the emails.
584 This is useful if your default address is not the address that is
585 subscribed to a list. In order to use the
<em>From
</em> address, set the
586 value to
"auto". If you use the sendmail binary, you must have
587 suitable privileges for the -f parameter. Default is the value of the
588 <em>sendemail.envelopesender
</em> configuration variable; if that is
589 unspecified, choosing the envelope sender is left to your MTA.
593 --smtp-encryption=
<encryption
>
597 Specify the encryption to use, either
<em>ssl
</em> or
<em>tls
</em>. Any other
598 value reverts to plain SMTP. Default is the value of
599 <em>sendemail.smtpencryption
</em>.
603 --smtp-domain=
<FQDN
>
607 Specifies the Fully Qualified Domain Name (FQDN) used in the
608 HELO/EHLO command to the SMTP server. Some servers require the
609 FQDN to match your IP address. If not set, git send-email attempts
610 to determine your FQDN automatically. Default is the value of
611 <em>sendemail.smtpdomain
</em>.
615 --smtp-pass[=
<password
>]
619 Password for SMTP-AUTH. The argument is optional: If no
620 argument is specified, then the empty string is used as
621 the password. Default is the value of
<em>sendemail.smtppass
</em>,
622 however
<em>--smtp-pass
</em> always overrides this value.
624 <div class=
"paragraph"><p>Furthermore, passwords need not be specified in configuration files
625 or on the command line. If a username has been specified (with
626 <em>--smtp-user
</em> or a
<em>sendemail.smtpuser
</em>), but no password has been
627 specified (with
<em>--smtp-pass
</em> or
<em>sendemail.smtppass
</em>), then the
628 user is prompted for a password while the input is masked for privacy.
</p></div>
631 --smtp-server=
<host
>
635 If set, specifies the outgoing SMTP server to use (e.g.
636 <tt>smtp.example.com
</tt> or a raw IP address). Alternatively it can
637 specify a full pathname of a sendmail-like program instead;
638 the program must support the
<tt>-i
</tt> option. Default value can
639 be specified by the
<em>sendemail.smtpserver
</em> configuration
640 option; the built-in default is
<tt>/usr/sbin/sendmail
</tt> or
641 <tt>/usr/lib/sendmail
</tt> if such program is available, or
642 <tt>localhost
</tt> otherwise.
646 --smtp-server-port=
<port
>
650 Specifies a port different from the default port (SMTP
651 servers typically listen to smtp port
25, but may also listen to
652 submission port
587, or the common SSL smtp port
465);
653 symbolic port names (e.g.
"submission" instead of
587)
654 are also accepted. The port can also be set with the
655 <em>sendemail.smtpserverport
</em> configuration variable.
659 --smtp-server-option=
<option
>
663 If set, specifies the outgoing SMTP server option to use.
664 Default value can be specified by the
<em>sendemail.smtpserveroption
</em>
665 configuration option.
667 <div class=
"paragraph"><p>The --smtp-server-option option must be repeated for each option you want
668 to pass to the server. Likewise, different lines in the configuration files
669 must be used for each option.
</p></div>
676 Legacy alias for
<em>--smtp-encryption ssl
</em>.
680 --smtp-user=
<user
>
684 Username for SMTP-AUTH. Default is the value of
<em>sendemail.smtpuser
</em>;
685 if a username is not specified (with
<em>--smtp-user
</em> or
<em>sendemail.smtpuser
</em>),
686 then authentication is not attempted.
690 <h3 id=
"_automating">Automating
</h3><div style=
"clear:left"></div>
691 <div class=
"dlist"><dl>
693 --to-cmd=
<command
>
697 Specify a command to execute once per patch file which
698 should generate patch file specific
"To:" entries.
699 Output of this command must be single email address per line.
700 Default is the value of
<em>sendemail.tocmd
</em> configuration value.
704 --cc-cmd=
<command
>
708 Specify a command to execute once per patch file which
709 should generate patch file specific
"Cc:" entries.
710 Output of this command must be single email address per line.
711 Default is the value of
<em>sendemail.cccmd
</em> configuration value.
715 --[no-]chain-reply-to
719 If this is set, each email will be sent as a reply to the previous
720 email sent. If disabled with
"--no-chain-reply-to", all emails after
721 the first will be sent as replies to the first email sent. When using
722 this, it is recommended that the first file given be an overview of the
723 entire patch series. Disabled by default, but the
<em>sendemail.chainreplyto
</em>
724 configuration variable can be used to enable it.
728 --identity=
<identity
>
732 A configuration identity. When given, causes values in the
733 <em>sendemail.
<identity
></em> subsection to take precedence over
734 values in the
<em>sendemail
</em> section. The default identity is
735 the value of
<em>sendemail.identity
</em>.
739 --[no-]signed-off-by-cc
743 If this is set, add emails found in Signed-off-by: or Cc: lines to the
744 cc list. Default is the value of
<em>sendemail.signedoffbycc
</em> configuration
745 value; if that is unspecified, default to --signed-off-by-cc.
749 --suppress-cc=
<category
>
753 Specify an additional category of recipients to suppress the
756 <div class=
"ulist"><ul>
759 <em>author
</em> will avoid including the patch author
764 <em>self
</em> will avoid including the sender
769 <em>cc
</em> will avoid including anyone mentioned in Cc lines in the patch header
770 except for self (use
<em>self
</em> for that).
775 <em>bodycc
</em> will avoid including anyone mentioned in Cc lines in the
776 patch body (commit message) except for self (use
<em>self
</em> for that).
781 <em>sob
</em> will avoid including anyone mentioned in Signed-off-by lines except
782 for self (use
<em>self
</em> for that).
787 <em>cccmd
</em> will avoid running the --cc-cmd.
792 <em>body
</em> is equivalent to
<em>sob
</em> +
<em>bodycc
</em>
797 <em>all
</em> will suppress all auto cc values.
801 <div class=
"paragraph"><p>Default is the value of
<em>sendemail.suppresscc
</em> configuration value; if
802 that is unspecified, default to
<em>self
</em> if --suppress-from is
803 specified, as well as
<em>body
</em> if --no-signed-off-cc is specified.
</p></div>
810 If this is set, do not add the From: address to the cc: list.
811 Default is the value of
<em>sendemail.suppressfrom
</em> configuration
812 value; if that is unspecified, default to --no-suppress-from.
820 If this is set, the In-Reply-To and References headers will be
821 added to each email sent. Whether each mail refers to the
822 previous email (
<tt>deep
</tt> threading per
<em>git format-patch
</em>
823 wording) or to the first email (
<tt>shallow
</tt> threading) is
824 governed by
"--[no-]chain-reply-to".
826 <div class=
"paragraph"><p>If disabled with
"--no-thread", those headers will not be added
827 (unless specified with --in-reply-to). Default is the value of the
828 <em>sendemail.thread
</em> configuration value; if that is unspecified,
829 default to --thread.
</p></div>
830 <div class=
"paragraph"><p>It is up to the user to ensure that no In-Reply-To header already
831 exists when
<em>git send-email
</em> is asked to add it (especially note that
832 <em>git format-patch
</em> can be configured to do the threading itself).
833 Failure to do so may not produce the expected result in the
834 recipient
’s MUA.
</p></div>
837 <h3 id=
"_administering">Administering
</h3><div style=
"clear:left"></div>
838 <div class=
"dlist"><dl>
840 --confirm=
<mode
>
844 Confirm just before sending:
846 <div class=
"ulist"><ul>
849 <em>always
</em> will always confirm before sending
854 <em>never
</em> will never confirm before sending
859 <em>cc
</em> will confirm before sending when send-email has automatically
860 added addresses from the patch to the Cc list
865 <em>compose
</em> will confirm before sending the first message when using --compose.
870 <em>auto
</em> is equivalent to
<em>cc
</em> +
<em>compose
</em>
874 <div class=
"paragraph"><p>Default is the value of
<em>sendemail.confirm
</em> configuration value; if that
875 is unspecified, default to
<em>auto
</em> unless any of the suppress options
876 have been specified, in which case default to
<em>compose
</em>.
</p></div>
883 Do everything except actually send the emails.
891 When an argument may be understood either as a reference or as a file name,
892 choose to understand it as a format-patch argument (
<em>--format-patch
</em>)
893 or as a file name (
<em>--no-format-patch
</em>). By default, when such a conflict
894 occurs, git send-email will fail.
902 Make git-send-email less verbose. One line per email should be
911 Perform sanity checks on patches.
912 Currently, validation means the following:
914 <div class=
"ulist"><ul>
917 Warn of patches that contain lines longer than
998 characters; this
918 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>.
922 <div class=
"paragraph"><p>Default is the value of
<em>sendemail.validate
</em>; if this is not set,
923 default to
<em>--validate
</em>.
</p></div>
930 Send emails even if safety checks would prevent it.
935 <h2 id=
"_configuration">CONFIGURATION
</h2>
936 <div class=
"sectionbody">
937 <div class=
"dlist"><dl>
939 sendemail.aliasesfile
943 To avoid typing long email addresses, point this to one or more
944 email aliases files. You must also supply
<em>sendemail.aliasfiletype
</em>.
948 sendemail.aliasfiletype
952 Format of the file(s) specified in sendemail.aliasesfile. Must be
953 one of
<em>mutt
</em>,
<em>mailrc
</em>,
<em>pine
</em>,
<em>elm
</em>, or
<em>gnus
</em>.
961 If true (default), a single editor instance will be spawned to edit
962 files you have to edit (patches when
<em>--annotate
</em> is used, and the
963 summary when
<em>--compose
</em> is used). If false, files will be edited one
964 after the other, spawning a new editor each time.
972 Sets the default for whether to confirm before sending. Must be
973 one of
<em>always
</em>,
<em>never
</em>,
<em>cc
</em>,
<em>compose
</em>, or
<em>auto
</em>. See
<em>--confirm
</em>
974 in the previous section for the meaning of these values.
979 <h2 id=
"_example">EXAMPLE
</h2>
980 <div class=
"sectionbody">
981 <h3 id=
"_use_gmail_as_the_smtp_server">Use gmail as the smtp server
</h3><div style=
"clear:left"></div>
982 <div class=
"paragraph"><p>To use
<em>git send-email
</em> to send your patches through the GMail SMTP server,
983 edit ~/.gitconfig to specify your account settings:
</p></div>
984 <div class=
"literalblock">
985 <div class=
"content">
988 smtpserver = smtp.gmail.com
989 smtpuser = yourname@gmail.com
990 smtpserverport =
587</tt></pre>
992 <div class=
"paragraph"><p>Once your commits are ready to be sent to the mailing list, run the
993 following commands:
</p></div>
994 <div class=
"literalblock">
995 <div class=
"content">
996 <pre><tt>$ git format-patch --cover-letter -M origin/master -o outgoing/
997 $ edit outgoing/
0000-*
998 $ git send-email outgoing/*
</tt></pre>
1000 <div class=
"paragraph"><p>Note: the following perl modules are required
1001 Net::SMTP::SSL, MIME::Base64 and Authen::SASL
</p></div>
1003 <h2 id=
"_see_also">SEE ALSO
</h2>
1004 <div class=
"sectionbody">
1005 <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>
1007 <h2 id=
"_git">GIT
</h2>
1008 <div class=
"sectionbody">
1009 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
1012 <div id=
"footer-text">
1013 Last updated
2011-
07-
23 00:
49:
30 UTC