(window.webpackJsonp=window.webpackJsonp||[]).push([[1130],{1538:function(t,e,a){"use strict";a.r(e);var s=a(31),i=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"git-send-email"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#git-send-email"}},[t._v("#")]),t._v(" git send-email")]),t._v(" "),a("h2",{attrs:{id:"use-git-send-email-with-gmail"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#use-git-send-email-with-gmail"}},[t._v("#")]),t._v(" Use git send-email with Gmail")]),t._v(" "),a("p",[t._v("Background: if you work on a project like the Linux kernel, rather than make a pull request you will need to submit your commits to a listserv for review. This entry details how to use git-send email with Gmail.")]),t._v(" "),a("p",[t._v("Add the following to your .gitconfig file:")]),t._v(" "),a("div",{staticClass:"language-git extra-class"},[a("pre",{pre:!0,attrs:{class:"language-git"}},[a("code",[t._v("[sendemail]\n smtpserver = smtp.googlemail.com\n smtpencryption = tls\n smtpserverport = 587\n smtpuser = name@gmail.com\n\n")])])]),a("p",[t._v("Then on the web:\nGo to Google -> My Account -> Connected Apps & Sites -> Allow less secure apps -> Switch ON")]),t._v(" "),a("p",[t._v("To create a patch set:")]),t._v(" "),a("div",{staticClass:"language-git extra-class"},[a("pre",{pre:!0,attrs:{class:"language-git"}},[a("code",[t._v("git format-patch HEAD~~~~ --subject-prefix="),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PATCH "')]),t._v("\n\n")])])]),a("p",[t._v("Then send the patches to a listserv:")]),t._v(" "),a("div",{staticClass:"language-git extra-class"},[a("pre",{pre:!0,attrs:{class:"language-git"}},[a("code",[t._v("git send-email --annotate --to project-developers-list@listserve.example.com 00*.patch\n\n")])])]),a("p",[t._v("To create and send updated version (version 2 in this example) of the patch:")]),t._v(" "),a("div",{staticClass:"language-git extra-class"},[a("pre",{pre:!0,attrs:{class:"language-git"}},[a("code",[t._v("git format-patch -v 2 HEAD~~~~ ......\ngit send-email --to project-developers-list@listserve.example.com v2-00*.patch\n\n")])])]),a("h2",{attrs:{id:"composing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#composing"}},[t._v("#")]),t._v(" Composing")]),t._v(" "),a("p",[t._v('--from * Email From:\n--[no-]to * Email To:\n--[no-]cc * Email Cc:\n--[no-]bcc * Email Bcc:\n--subject * Email "Subject:"\n--in-reply-to * Email "In-Reply-To:"\n--[no-]xmailer * Add "X-Mailer:" header (default).\n--[no-]annotate * Review each patch that will be sent in an editor.\n--compose * Open an editor for introduction.\n--compose-encoding * Encoding to assume for introduction.\n--8bit-encoding * Encoding to assume 8bit mails if undeclared\n--transfer-encoding * Transfer encoding to use (quoted-printable, 8bit, base64)')]),t._v(" "),a("h2",{attrs:{id:"sending-patches-by-mail"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sending-patches-by-mail"}},[t._v("#")]),t._v(" Sending patches by mail")]),t._v(" "),a("p",[t._v("Suppose you’ve got a lot of commit against a project (here ulogd2, official branch is git-svn) and that you wan to send your patchset to the Mailling list devel@netfilter.org. To do so, just open a shell at the root of the git directory and use:")]),t._v(" "),a("div",{staticClass:"language-git extra-class"},[a("pre",{pre:!0,attrs:{class:"language-git"}},[a("code",[t._v("git format-patch --stat -p --raw --signoff --subject-prefix="),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ULOGD PATCH"')]),t._v(" -o /tmp/ulogd2/ -n git-svn\ngit send-email --compose --no-chain-reply-to --to devel@netfilter.org /tmp/ulogd2/\n\n")])])]),a("p",[t._v("First command will create a serie of mail from patches in /tmp/ulogd2/ with statistic report and second will start your editor to compose an introduction mail to the patchset. To avoid awful threaded mail series, one can use :")]),t._v(" "),a("div",{staticClass:"language-git extra-class"},[a("pre",{pre:!0,attrs:{class:"language-git"}},[a("code",[t._v("git config sendemail.chainreplyto false\n\n")])])]),a("p",[a("a",{attrs:{href:"https://home.regit.org/technical-articles/git-for-the-newbie/",target:"_blank",rel:"noopener noreferrer"}},[t._v("source"),a("OutboundLink")],1)]),t._v(" "),a("h4",{attrs:{id:"syntax"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#syntax"}},[t._v("#")]),t._v(" Syntax")]),t._v(" "),a("ul",[a("li",[t._v("git send-email [options] …​")]),t._v(" "),a("li",[t._v("git send-email --dump-aliases")])]),t._v(" "),a("h4",{attrs:{id:"remarks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#remarks"}},[t._v("#")]),t._v(" Remarks")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://git-scm.com/docs/git-send-email",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://git-scm.com/docs/git-send-email"),a("OutboundLink")],1)])])}),[],!1,null,null,null);e.default=i.exports}}]);