Skip to content

Instantly share code, notes, and snippets.

@bensenq
Forked from jasonkarns/readme.md
Created April 26, 2025 12:54
Show Gist options
  • Select an option

  • Save bensenq/6f4665af40e84a1c17649f99c8be07ab to your computer and use it in GitHub Desktop.

Select an option

Save bensenq/6f4665af40e84a1c17649f99c8be07ab to your computer and use it in GitHub Desktop.
Git send-email using Gmail
  1. Configure Gmail in you gitconfig:
[sendemail]
  smtpserver = smtp.gmail.com
  smtpserverport = 587
  smtpencryption = tls
  smtpuser = <gmail email address>
  from = <email address for From: field>

I also recommend setting up an application-specific password in Google for this. Account -> Security -> Connected applications and sites : Manage Access

  1. Determine your revlist. To send a single commit, just use the sha. To send a range of commits, you can use start_sha..end_sha. Most likely, you'll want to send the commits made to a branch that are missing in upstream. For that, you would use: upstream/branch_name..branch_name

  2. Send email:

git send-email <revlist> --to <[email protected]>
  1. If you receive an error like this:
Can't locate Net/SMTP/SSL.pm in @INC (@INC contains: ...

you'll need to upgrade/install the Net::SMTP::SSL package:

sudo -H cpan Net::SMTP::SSL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment