git show –format=email

git send-email is quite convenient to send patches out, but it isn’t convenient to update patch in the same thread, unless you know the message-id and use –in-reply-to option.  What I am doing is git format-patch first and paste the patch in the mail editor.  However, after several months, the directory is full of .patch files.  I start to look for alternative.

git show can show the commit, but the format isn’t perfect for pasting in email.  I find option –format=email perfectly meets my need.  I can git show –format=email COMMIT_ID | xclip, and click mouse middle button in the mail editor to paste it.  It is clean because there is no .patch file left on my disk.

Leave a comment