blob: f0e57a597b6e551d891c064fa69837db632237c6 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-send-email(1)
2=================
3
4NAME
5----
6git-send-email - Send a collection of patches as emails
7
8
9SYNOPSIS
10--------
Junio C Hamano15567bc2011-07-23 00:51:5911[verse]
Junio C Hamano610d1762008-11-28 06:27:1312'git send-email' [options] <file|directory|rev-list options>...
Junio C Hamano1a4e8412005-12-27 08:17:2313
14
Junio C Hamano1a4e8412005-12-27 08:17:2315DESCRIPTION
16-----------
17Takes the patches given on the command line and emails them out.
Junio C Hamanob95b43d2009-06-12 08:57:2818Patches can be specified as files, directories (which will send all
19files in the directory), or directly as a revision list. In the
20last case, any format accepted by linkgit:git-format-patch[1] can
21be passed to git send-email.
Junio C Hamano1a4e8412005-12-27 08:17:2322
23The header of the email is configurable by command line options. If not
24specified on the command line, the user will be prompted with a ReadLine
25enabled interface to provide the necessary information.
26
Junio C Hamanoa6455f62009-02-20 08:33:0827There are two formats accepted for patch files:
28
291. mbox format files
30+
31This is what linkgit:git-format-patch[1] generates. Most headers and MIME
32formatting are ignored.
33
342. The original format used by Greg Kroah-Hartman's 'send_lots_of_email.pl'
35script
36+
37This format expects the first line of the file to contain the "Cc:" value
38and the "Subject:" of the message as the second line.
39
Junio C Hamanoa476efa2008-10-10 15:31:4240
Junio C Hamano1a4e8412005-12-27 08:17:2341OPTIONS
42-------
Junio C Hamanoa476efa2008-10-10 15:31:4243
44Composing
45~~~~~~~~~
Junio C Hamano1a4e8412005-12-27 08:17:2346
Junio C Hamano3d141512009-06-01 01:22:4047--annotate::
Junio C Hamanoea3b7522013-04-18 19:37:5348Review and edit each patch you're about to send. Default is the value
49of 'sendemail.annotate'. See the CONFIGURATION section for
50'sendemail.multiedit'.
Junio C Hamano3d141512009-06-01 01:22:4051
Junio C Hamanob4a9ede2009-04-08 07:36:3252--bcc=<address>::
Junio C Hamanoa476efa2008-10-10 15:31:4253Specify a "Bcc:" value for each email. Default is the value of
54'sendemail.bcc'.
Junio C Hamanoa3fd83c2007-03-02 10:34:3655+
56The --bcc option must be repeated for each user you want on the bcc list.
Junio C Hamano97f518c2006-06-22 19:49:3557
Junio C Hamanob4a9ede2009-04-08 07:36:3258--cc=<address>::
Junio C Hamanoc9154122006-02-15 02:22:0659Specify a starting "Cc:" value for each email.
Junio C Hamano1d40ee82009-01-07 10:14:1660Default is the value of 'sendemail.cc'.
Junio C Hamanoa3fd83c2007-03-02 10:34:3661+
62The --cc option must be repeated for each user you want on the cc list.
Junio C Hamano97f518c2006-06-22 19:49:3563
Junio C Hamano86f75882006-02-06 02:27:2364--compose::
Junio C Hamano3b70d3c2009-11-21 17:37:3765Invoke a text editor (see GIT_EDITOR in linkgit:git-var[1])
66to edit an introductory message for the patch series.
Junio C Hamano610d1762008-11-28 06:27:1367+
Junio C Hamanoea82cff2009-03-18 01:54:4868When '--compose' is used, git send-email will use the From, Subject, and
69In-Reply-To headers specified in the message. If the body of the message
70(what you type after the headers and a blank line) only contains blank
Junio C Hamano076ffcc2013-02-06 05:13:2171(or Git: prefixed) lines the summary won't be sent, but From, Subject,
Junio C Hamanoea82cff2009-03-18 01:54:4872and In-Reply-To headers will be used unless they are removed.
Junio C Hamano610d1762008-11-28 06:27:1373+
Junio C Hamanoea82cff2009-03-18 01:54:4874Missing From or In-Reply-To headers will be prompted for.
Junio C Hamano3d141512009-06-01 01:22:4075+
76See the CONFIGURATION section for 'sendemail.multiedit'.
Junio C Hamano86f75882006-02-06 02:27:2377
Junio C Hamanob4a9ede2009-04-08 07:36:3278--from=<address>::
Junio C Hamano7ae18252009-05-23 09:53:3279Specify the sender of the emails. If not specified on the command line,
80the value of the 'sendemail.from' configuration option is used. If
81neither the command line option nor 'sendemail.from' are set, then the
82user will be prompted for the value. The default for the prompt will be
83the value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not
84set, as returned by "git var -l".
Junio C Hamano86f75882006-02-06 02:27:2385
Junio C Hamanob4a9ede2009-04-08 07:36:3286--in-reply-to=<identifier>::
Junio C Hamano97bcb482010-11-25 03:16:0787Make the first mail (or all the mails with `--no-thread`) appear as a
88reply to the given Message-Id, which avoids breaking threads to
89provide a new patch series.
90The second and subsequent emails will be sent as replies according to
91the `--[no]-chain-reply-to` setting.
92+
93So for example when `--thread` and `--no-chain-reply-to` are specified, the
94second and subsequent patches will be replies to the first one like in the
95illustration below where `[PATCH v2 0/3]` is in reply to `[PATCH 0/2]`:
96+
97 [PATCH 0/2] Here is what I did...
98 [PATCH 1/2] Clean up and tests
99 [PATCH 2/2] Implementation
100 [PATCH v2 0/3] Here is a reroll
101 [PATCH v2 1/3] Clean up
102 [PATCH v2 2/3] New tests
103 [PATCH v2 3/3] Implementation
104+
105Only necessary if --compose is also set. If --compose
106is not set, this will be prompted for.
Junio C Hamano86f75882006-02-06 02:27:23107
Junio C Hamanob4a9ede2009-04-08 07:36:32108--subject=<string>::
Junio C Hamanoa476efa2008-10-10 15:31:42109Specify the initial subject of the email thread.
110Only necessary if --compose is also set. If --compose
111is not set, this will be prompted for.
Junio C Hamanoc9154122006-02-15 02:22:06112
Junio C Hamanob4a9ede2009-04-08 07:36:32113--to=<address>::
Junio C Hamanoa476efa2008-10-10 15:31:42114Specify the primary recipient of the emails generated. Generally, this
115will be the upstream maintainer of the project involved. Default is the
116value of the 'sendemail.to' configuration value; if that is unspecified,
Junio C Hamano39c7a692010-10-27 06:08:54117and --to-cmd is not specified, this will be prompted for.
Junio C Hamanoa476efa2008-10-10 15:31:42118+
119The --to option must be repeated for each user you want on the to list.
Junio C Hamano86f75882006-02-06 02:27:23120
Junio C Hamano4015aed2010-06-27 20:07:42121--8bit-encoding=<encoding>::
122When encountering a non-ASCII message or subject that does not
123declare its encoding, add headers/quoting to indicate it is
124encoded in <encoding>. Default is the value of the
125'sendemail.assume8bitEncoding'; if that is unspecified, this
126will be prompted for if any non-ASCII files are encountered.
127+
128Note that no attempts whatsoever are made to validate the encoding.
129
Junio C Hamanoa1295452012-11-13 22:32:04130--compose-encoding=<encoding>::
131Specify encoding of compose message. Default is the value of the
132'sendemail.composeencoding'; if that is unspecified, UTF-8 is assumed.
133
Junio C Hamanoa476efa2008-10-10 15:31:42134
135Sending
136~~~~~~~
137
Junio C Hamanob4a9ede2009-04-08 07:36:32138--envelope-sender=<address>::
Junio C Hamanoa476efa2008-10-10 15:31:42139Specify the envelope sender used to send the emails.
140This is useful if your default address is not the address that is
Junio C Hamano2bd8a742009-12-01 21:16:59141subscribed to a list. In order to use the 'From' address, set the
142value to "auto". If you use the sendmail binary, you must have
143suitable privileges for the -f parameter. Default is the value of the
144'sendemail.envelopesender' configuration variable; if that is
Junio C Hamanoa476efa2008-10-10 15:31:42145unspecified, choosing the envelope sender is left to your MTA.
146
Junio C Hamanob4a9ede2009-04-08 07:36:32147--smtp-encryption=<encryption>::
Junio C Hamanoa476efa2008-10-10 15:31:42148Specify the encryption to use, either 'ssl' or 'tls'. Any other
149value reverts to plain SMTP. Default is the value of
150'sendemail.smtpencryption'.
151
Junio C Hamanocb39aea2010-05-09 07:24:48152--smtp-domain=<FQDN>::
153Specifies the Fully Qualified Domain Name (FQDN) used in the
154HELO/EHLO command to the SMTP server. Some servers require the
155FQDN to match your IP address. If not set, git send-email attempts
156to determine your FQDN automatically. Default is the value of
157'sendemail.smtpdomain'.
158
Junio C Hamanob4a9ede2009-04-08 07:36:32159--smtp-pass[=<password>]::
Junio C Hamanoa476efa2008-10-10 15:31:42160Password for SMTP-AUTH. The argument is optional: If no
161argument is specified, then the empty string is used as
162the password. Default is the value of 'sendemail.smtppass',
163however '--smtp-pass' always overrides this value.
164+
165Furthermore, passwords need not be specified in configuration files
166or on the command line. If a username has been specified (with
167'--smtp-user' or a 'sendemail.smtpuser'), but no password has been
Junio C Hamano5e7f1312013-03-21 22:49:01168specified (with '--smtp-pass' or 'sendemail.smtppass'), then
169a password is obtained using 'git-credential'.
Junio C Hamano68522892007-09-06 01:33:41170
Junio C Hamanob4a9ede2009-04-08 07:36:32171--smtp-server=<host>::
Junio C Hamanob63afff2007-05-01 03:05:55172If set, specifies the outgoing SMTP server to use (e.g.
173`smtp.example.com` or a raw IP address). Alternatively it can
174specify a full pathname of a sendmail-like program instead;
Junio C Hamanob19b4f02006-10-29 20:47:22175the program must support the `-i` option. Default value can
176be specified by the 'sendemail.smtpserver' configuration
177option; the built-in default is `/usr/sbin/sendmail` or
178`/usr/lib/sendmail` if such program is available, or
179`localhost` otherwise.
Junio C Hamano1a4e8412005-12-27 08:17:23180
Junio C Hamanob4a9ede2009-04-08 07:36:32181--smtp-server-port=<port>::
Junio C Hamano4fd58d42007-09-30 00:51:14182Specifies a port different from the default port (SMTP
Junio C Hamanobacccda2009-08-03 08:07:12183servers typically listen to smtp port 25, but may also listen to
184submission port 587, or the common SSL smtp port 465);
185symbolic port names (e.g. "submission" instead of 587)
Junio C Hamano3d141512009-06-01 01:22:40186are also accepted. The port can also be set with the
187'sendemail.smtpserverport' configuration variable.
Junio C Hamanofce7c7e2008-07-02 03:06:38188
Junio C Hamano39c7a692010-10-27 06:08:54189--smtp-server-option=<option>::
190If set, specifies the outgoing SMTP server option to use.
191Default value can be specified by the 'sendemail.smtpserveroption'
192configuration option.
193+
194The --smtp-server-option option must be repeated for each option you want
195to pass to the server. Likewise, different lines in the configuration files
196must be used for each option.
197
Junio C Hamano68522892007-09-06 01:33:41198--smtp-ssl::
Junio C Hamanoa476efa2008-10-10 15:31:42199Legacy alias for '--smtp-encryption ssl'.
Junio C Hamano68522892007-09-06 01:33:41200
Junio C Hamano58f587a2013-07-22 19:20:59201--smtp-ssl-cert-path::
202Path to ca-certificates (either a directory or a single file).
203Set it to an empty string to disable certificate verification.
204Defaults to the value set to the 'sendemail.smtpsslcertpath'
205configuration variable, if set, or `/etc/ssl/certs` otherwise.
206
Junio C Hamanob4a9ede2009-04-08 07:36:32207--smtp-user=<user>::
Junio C Hamanoa476efa2008-10-10 15:31:42208Username for SMTP-AUTH. Default is the value of 'sendemail.smtpuser';
209if a username is not specified (with '--smtp-user' or 'sendemail.smtpuser'),
210then authentication is not attempted.
Junio C Hamano86f75882006-02-06 02:27:23211
Junio C Hamano6ebd8042012-02-28 00:17:40212--smtp-debug=0|1::
213Enable (1) or disable (0) debug output. If enabled, SMTP
214commands and replies will be printed. Useful to debug TLS
215connection and authentication problems.
Junio C Hamanoa476efa2008-10-10 15:31:42216
217Automating
218~~~~~~~~~~
219
Junio C Hamano39c7a692010-10-27 06:08:54220--to-cmd=<command>::
221Specify a command to execute once per patch file which
222should generate patch file specific "To:" entries.
223Output of this command must be single email address per line.
224Default is the value of 'sendemail.tocmd' configuration value.
225
Junio C Hamanob4a9ede2009-04-08 07:36:32226--cc-cmd=<command>::
Junio C Hamanoa476efa2008-10-10 15:31:42227Specify a command to execute once per patch file which
228should generate patch file specific "Cc:" entries.
229Output of this command must be single email address per line.
230Default is the value of 'sendemail.cccmd' configuration value.
231
Junio C Hamano25e7ba62009-06-14 01:03:22232--[no-]chain-reply-to::
Junio C Hamanoa476efa2008-10-10 15:31:42233If this is set, each email will be sent as a reply to the previous
234email sent. If disabled with "--no-chain-reply-to", all emails after
235the first will be sent as replies to the first email sent. When using
236this, it is recommended that the first file given be an overview of the
Junio C Hamano096dde22009-12-26 23:14:11237entire patch series. Disabled by default, but the 'sendemail.chainreplyto'
238configuration variable can be used to enable it.
Junio C Hamanoa476efa2008-10-10 15:31:42239
Junio C Hamanob4a9ede2009-04-08 07:36:32240--identity=<identity>::
Junio C Hamanoa476efa2008-10-10 15:31:42241A configuration identity. When given, causes values in the
242'sendemail.<identity>' subsection to take precedence over
243values in the 'sendemail' section. The default identity is
244the value of 'sendemail.identity'.
245
246--[no-]signed-off-by-cc::
247If this is set, add emails found in Signed-off-by: or Cc: lines to the
248cc list. Default is the value of 'sendemail.signedoffbycc' configuration
249value; if that is unspecified, default to --signed-off-by-cc.
Junio C Hamanoc9154122006-02-15 02:22:06250
Junio C Hamanob4a9ede2009-04-08 07:36:32251--suppress-cc=<category>::
Junio C Hamano9c334152008-02-12 03:18:52252Specify an additional category of recipients to suppress the
Junio C Hamano0a235222009-03-06 08:21:09253auto-cc of:
254+
255--
256- 'author' will avoid including the patch author
257- 'self' will avoid including the sender
258- 'cc' will avoid including anyone mentioned in Cc lines in the patch header
259 except for self (use 'self' for that).
Junio C Hamano0e88f3e2009-06-21 08:03:25260- 'bodycc' will avoid including anyone mentioned in Cc lines in the
Junio C Hamano0a235222009-03-06 08:21:09261 patch body (commit message) except for self (use 'self' for that).
262- 'sob' will avoid including anyone mentioned in Signed-off-by lines except
263 for self (use 'self' for that).
264- 'cccmd' will avoid running the --cc-cmd.
Junio C Hamano0e88f3e2009-06-21 08:03:25265- 'body' is equivalent to 'sob' + 'bodycc'
Junio C Hamano0a235222009-03-06 08:21:09266- 'all' will suppress all auto cc values.
267--
268+
269Default is the value of 'sendemail.suppresscc' configuration value; if
270that is unspecified, default to 'self' if --suppress-from is
271specified, as well as 'body' if --no-signed-off-cc is specified.
Junio C Hamano9c334152008-02-12 03:18:52272
Junio C Hamanoa476efa2008-10-10 15:31:42273--[no-]suppress-from::
274If this is set, do not add the From: address to the cc: list.
275Default is the value of 'sendemail.suppressfrom' configuration
276value; if that is unspecified, default to --no-suppress-from.
277
278--[no-]thread::
Junio C Hamano1bbd0f42009-07-23 06:20:29279If this is set, the In-Reply-To and References headers will be
280added to each email sent. Whether each mail refers to the
281previous email (`deep` threading per 'git format-patch'
282wording) or to the first email (`shallow` threading) is
283governed by "--[no-]chain-reply-to".
284+
285If disabled with "--no-thread", those headers will not be added
286(unless specified with --in-reply-to). Default is the value of the
287'sendemail.thread' configuration value; if that is unspecified,
288default to --thread.
289+
290It is up to the user to ensure that no In-Reply-To header already
291exists when 'git send-email' is asked to add it (especially note that
292'git format-patch' can be configured to do the threading itself).
293Failure to do so may not produce the expected result in the
294recipient's MUA.
Junio C Hamanoa476efa2008-10-10 15:31:42295
296
297Administering
298~~~~~~~~~~~~~
Junio C Hamanoddc5ad42007-06-27 07:14:52299
Junio C Hamanob4a9ede2009-04-08 07:36:32300--confirm=<mode>::
Junio C Hamano0a235222009-03-06 08:21:09301Confirm just before sending:
302+
303--
304- 'always' will always confirm before sending
305- 'never' will never confirm before sending
306- 'cc' will confirm before sending when send-email has automatically
307 added addresses from the patch to the Cc list
308- 'compose' will confirm before sending the first message when using --compose.
309- 'auto' is equivalent to 'cc' + 'compose'
310--
311+
312Default is the value of 'sendemail.confirm' configuration value; if that
313is unspecified, default to 'auto' unless any of the suppress options
314have been specified, in which case default to 'compose'.
315
Junio C Hamano45889b42007-04-26 07:20:04316--dry-run::
317Do everything except actually send the emails.
318
Junio C Hamano3d141512009-06-01 01:22:40319--[no-]format-patch::
320When an argument may be understood either as a reference or as a file name,
321choose to understand it as a format-patch argument ('--format-patch')
322or as a file name ('--no-format-patch'). By default, when such a conflict
323occurs, git send-email will fail.
324
Junio C Hamanoa476efa2008-10-10 15:31:42325--quiet::
326Make git-send-email less verbose. One line per email should be
327all that is output.
Junio C Hamano45889b42007-04-26 07:20:04328
Junio C Hamanoa476efa2008-10-10 15:31:42329--[no-]validate::
330Perform sanity checks on patches.
331Currently, validation means the following:
Junio C Hamanoa3fd83c2007-03-02 10:34:36332+
Junio C Hamanoa476efa2008-10-10 15:31:42333--
334* Warn of patches that contain lines longer than 998 characters; this
335is due to SMTP limits as described by http://www.ietf.org/rfc/rfc2821.txt.
336--
337+
338Default is the value of 'sendemail.validate'; if this is not set,
339default to '--validate'.
Junio C Hamano97f518c2006-06-22 19:49:35340
Junio C Hamanocf29d332010-12-11 07:28:56341--force::
342Send emails even if safety checks would prevent it.
343
Junio C Hamano1a4e8412005-12-27 08:17:23344
Junio C Hamanoc51fede2007-03-12 07:29:20345CONFIGURATION
346-------------
Junio C Hamano68522892007-09-06 01:33:41347
Junio C Hamanoc51fede2007-03-12 07:29:20348sendemail.aliasesfile::
349To avoid typing long email addresses, point this to one or more
350email aliases files. You must also supply 'sendemail.aliasfiletype'.
351
352sendemail.aliasfiletype::
353Format of the file(s) specified in sendemail.aliasesfile. Must be
Junio C Hamano07738342009-04-23 03:06:56354one of 'mutt', 'mailrc', 'pine', 'elm', or 'gnus'.
Junio C Hamanoc51fede2007-03-12 07:29:20355
Junio C Hamano610d1762008-11-28 06:27:13356sendemail.multiedit::
357If true (default), a single editor instance will be spawned to edit
358files you have to edit (patches when '--annotate' is used, and the
359summary when '--compose' is used). If false, files will be edited one
360after the other, spawning a new editor each time.
361
Junio C Hamano0a235222009-03-06 08:21:09362sendemail.confirm::
363Sets the default for whether to confirm before sending. Must be
364one of 'always', 'never', 'cc', 'compose', or 'auto'. See '--confirm'
365in the previous section for the meaning of these values.
366
Junio C Hamanob77f8192011-05-05 01:30:38367EXAMPLE
368-------
Junio C Hamanofacbe512010-05-05 02:42:36369Use gmail as the smtp server
Junio C Hamanob77f8192011-05-05 01:30:38370~~~~~~~~~~~~~~~~~~~~~~~~~~~~
371To use 'git send-email' to send your patches through the GMail SMTP server,
372edit ~/.gitconfig to specify your account settings:
Junio C Hamanofacbe512010-05-05 02:42:36373
374[sendemail]
375smtpencryption = tls
376smtpserver = smtp.gmail.com
377smtpuser = yourname@gmail.com
378smtpserverport = 587
379
Junio C Hamanob77f8192011-05-05 01:30:38380Once your commits are ready to be sent to the mailing list, run the
381following commands:
382
383$ git format-patch --cover-letter -M origin/master -o outgoing/
384$ edit outgoing/0000-*
385$ git send-email outgoing/*
386
Junio C Hamanofacbe512010-05-05 02:42:36387Note: the following perl modules are required
388 Net::SMTP::SSL, MIME::Base64 and Authen::SASL
389
Junio C Hamanob77f8192011-05-05 01:30:38390SEE ALSO
391--------
392linkgit:git-format-patch[1], linkgit:git-imap-send[1], mbox(5)
393
Junio C Hamano1a4e8412005-12-27 08:17:23394GIT
395---
Junio C Hamanof7c042d2008-06-06 22:50:53396Part of the linkgit:git[1] suite