Create and Email a patch with Git

Create a patch of a single commit.
git format-patch f98358d9b7af7e7429fec40b2da88feb5fafe6cf -1

Email the patch as an attachment.
echo "My Message Body" | mutt -s "my subject line" -a 0001-Added-database-build-infrastructure.patch -- recipient@email-server.com

Apply the patch.
git apply 0001-Added-database-build-infrastructure.patch

Leave a Comment