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 freedesktop.org. The following assumes familiarity with creating commits with git.
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:
[sendemail] smtpencryption = tls smtpserver = smtp.gmail.com smtpuser = email@example.com smtpserverport = 587 from = firstname.lastname@example.org suppresscc = all
- With employer's servers:
smtpserver = mail.employer.com smtpuser = myLDAPusername from = email@example.com 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.
- 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.
- 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"
--firstname.lastname@example.org --email@example.com 0000-cover-letter.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
- To send through Google servers, you will need an application-specific password.
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: