Skip to end of metadata
Go to start of metadata

Sending patches via git is easy for users who are familiar with git, and is the best practice followed by projects like the Linux kernel and those hosted at The following assumes familiarity with creating commits with git.




Install git-email:

Debian or Ubuntu: apt-get install git-email

Fedora, RHEL or CentOS: yum install git-email

Set up the SMTP server from the machine that you will use for contributing patches.

  • Use Google's servers, assuming you have an account with Google. (You need not use the account for anything else.)

In your global or project .gitconfig file, add the following stanza:

   smtpencryption = tls
   smtpserver =
   smtpuser =
   smtpserverport = 587
   from =
   suppresscc = all


  • With employer's servers:


   smtpserver =
   smtpuser = myLDAPusername
   from =
   suppresscc = all


Discovering the Exchange server SMTP hostname:

  • In Outlook Web App, I navigated to "Options ... See all options."
  • Under "Account" tab, I clicked on "Settings for POP, IMAP and SMTP access."
  • I copied "Server name" from the "IMAP setting" list.

Creating Patches

  • Prepare your patches, preferably with "git format-patch HEAD~n", where n is the number of patches you want to submit.
    • For submissions with more than one patch, use "git format-patch --cover-letter HEAD~n" instead in order to create an empty explanatory document named 0000-cover-letter.patch. Use a text editor to add a summary of your patches to the file.
  • Determine the maintainer of the GENIVI project to wish you plan to submit.

Sending Patches

  • Type the following at a shell prompt from the directory where you have created the patches:

git send-email --subject="[PATCH] summary of patch contents" 0000-cover-letter.patch 0001-commit-message.patch Optionally include "--from=" to override the default in your .gitconfig file.

  • What happens next depends on the SMTP server you've used. With employer's Active Directory or LDAP server, you'll need to enter the password you use to login to corporate network, seeing something like

Password for 'smtp://': OK. Log says: Server: X-Mailer: git-send-email 1.8.4 Result: Queued mail for delivery

Sending an Amended Patch

  • For a second version change the subject to "[PATCHv2] amended version of brilliant contribution".
  • To preserver email threading, add the field

where the value of the option is obtained by examining the header of the message to your which you're responding. On Gmail, find this hash by choosing "Show original" from the drop-down menu that allows choosing Reply, Forward, etc.



Transferred from MediaWiki.  Original author and history:
17:22, 12 June 2015‎, Alison
for Latest changes  -> View Page History in this Wiki


  • No labels