obs: This tutorial was only for reference. Tutorial 6 was followed instead.
Sending Patches via Git Send-Email
In communities like the Linux Kernel, contributions aren’t made via Pull Requests. Instead, we use patches sent via email. Since standard email clients often ruin code formatting (converting tabs to spaces or adding HTML), git send-email is the professional standard.
Setup
Depending on your distro, you might need to install the email functionalitity separately. Ubuntu:
sudo apt-get install git-email
# Identity
git config --global user.name "Your Full Name"
git config --global user.email "yourname@email.com"
# SMTP Settings
git config --global sendemail.smtpencryption tls
git config --global sendemail.smtpserver "smtp.gmail.com"
git config --global sendemail.smtpuser "yourname@email.com"
git config --global sendemail.smtpserverport 587
Sending patches
# send your last commit
git send-email --annotate --to="list@mailing.com" -1
# multiple commits
git send-email --annotate --cover-letter --thread --no-chain-reply-to --to="list@mailing.com" -3
Tips
# to test everything without actually sending an email.
--dry-run
# change your default git editor
git config --global core.editor "vim"