Next: , Up: Sending Patches   [Contents]


3.3.1 Git Patches

There are multiple ways of sending patches with git. Unfortunately, the most popular / official way of doing it requires Perl and some extra Perl libraries that are not packaged in the repository. This section tries to list other options that are just as useful as ‘git send-email’.

  1. git-send-email’ with msmtp

    By default, ‘git-send-email’ uses a Perl SMTP client, but without using it this command doesn’t actually need extra Perl libraries, only Perl itself. So, if you are okay with using Perl, the easiest option is to install the ‘msmtp’ package, and change your git configuration to match your msmtp settings.

    To your ‘~/.gitconfig’, add the following section:

    [sendemail]
        smtpserver = /usr/bin/msmtp
        smtpserveroption = -a
        smtpserveroption = your-account-name
    
  2. git-imap-send

    The ‘git imap-send’ command reads patches in mbox format, and uploads it to your imap server as drafts. You can then use your preferred email-client to edit and send them. This is the option with no dependencies. Check out the manual page ‘git-imap-send(1)’ for more information on setting up.