Last Updated: February 25, 2016
·
14.09K
· benwoody

Setting up git send-email with gmail

This talks about using gmail as the smtp server, but really, as long as you know your smtp settings, it's universal on how to set it up.

In your ~/.gitconfig:

[sendemail]
from = YourName <email@gmail.com>
smtpserver = smtp.gmail.com
smtpuser = email@gmail.com
smtpencryption = tls
smtppass = PASSWORD
chainreplyto = false
smtpserverport = 587

This works with business emails that use gmail services as well.

To build the patch:

git format-patch --cover-letter -M origin/master -o outgoing/

where origin/master is the patch branch you wish to send and outgoing/ is the directory where the patches will live.

You then need to edit the coverletter in the outoing/dir.

To Send:

git send-email outgoing/*