LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-send-email

Send patches as emails via SMTP

TLDR

Send patches via email
$ git send-email [*.patch]
copy
Send to specific address
$ git send-email --to=[maintainer@project.org] [patch]
copy
Send with cover letter
$ git send-email --cover-letter [*.patch]
copy
Dry run
$ git send-email --dry-run [patch]
copy

SYNOPSIS

git send-email [options] patches

DESCRIPTION

git send-email sends patches as properly formatted emails. It is the standard way to submit patches to projects using email-based workflows, such as the Linux kernel.The command handles SMTP configuration, threading, and patch formatting. It integrates with `git format-patch` output and supports cover letters for patch series.

PARAMETERS

PATCHES

Patch files to send.
--to ADDRESS
Recipient email.
--cc ADDRESS
CC recipient.
--cover-letter
Include cover letter.
--dry-run
Show what would be sent.
--annotate
Edit patches before sending.
--smtp-server HOST
SMTP server.
--smtp-encryption tls|ssl
Encryption method for the SMTP connection.
--suppress-cc category
Suppress auto-CC of a category (e.g. self, author, cccmd).
--compose
Edit an introductory message/cover letter before sending.
--in-reply-to MESSAGE-ID
Thread the patches as replies to a given message.
--help
Display help information.

CONFIGURATION

sendemail.smtpServer

SMTP server hostname or path to sendmail binary, configured via `git config`.
sendemail.smtpUser
SMTP username for authentication.
sendemail.to
Default recipient address.

INSTALL

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

CAVEATS

Requires SMTP configuration. Some firewalls block SMTP. Cover letters need manual editing.

HISTORY

git send-email supports the email-based patch workflow used by the Linux kernel and other projects, sending properly formatted patch emails.

SEE ALSO

RESOURCES

Copied to clipboard
Kai