Sending patches through your GMail account with Git

May 25, 2010

Configuring git send-email to use Gmail SMTP

If you dont have the command git-send-email command then install it using apt-get install git-send-email

Then, add the correct configuration variables with the following:

$ git config –global sendemail.smtpserver smtp.gmail.com
$ git config –global sendemail.smtpserverport 587
$ git config –global sendemail.smtpencryption tls
$ git config –global sendemail.smtpuser your_email@gmail.com

Now it’s ready: the command git send-email patch-name will ask you for some info about the email sender (you can change the From: field) and recipient, your Gmail password and then it will send the email.

Optionally, it is possible to skip the password prompt by adding it to the configuration with:

$ git config –global sendemail.smtppass your_password

Thats it.

  • Share/Bookmark

One Response to “Sending patches through your GMail account with Git”

  1. 小伙你对git太痴迷了。

Leave a Reply