This page permanently redirects to gemini://log.pfad.fr/2022/git-send-email/.

Git send-email with format-patch

=> [Update 2023] Git send-email without format-patch

My outdated workflow using format-patch is still available here, but I strongly recommend switching to the workflow above.

Git ships with built-in tools for collaborating over email. Sourcehut made a decent tutorial for it:

=> https://git-send-email.io/

I was successful in following the tutorial and submitting a couple of patches. However after a couple of mistakes, here is my workflow for working with git send-email:

Enter format-patch

It happens quite often, that I make a mistake at some step of "git send-email" and cancel the command. However, it means that all my message is lost, which I found very frustrating. So now call "git format-patch" to create the patch file, edit it with my editor and then send the email:

# Check existing git config and adjust settings
git config --get-regex "^format\..*"
git config format.to "list@example.com"
git config format.subjectprefix "PATCH project"

# Submit a patch
git format-patch origin/master
$EDITOR 0001-XXX.patch
git send-email 0001-XXX.patch
rm 0001-XXX.patch

Yes, it means that I have to use 4 commands instead of one. However, if anything fails, I can resume from where I left.

📅 2022-12-03

=> Back to the index

=> Send me a comment or feedback

Proxy Information
Original URL
gemini://log.pfad.fr/2022/git-send-email
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
308.228364 milliseconds
Gemini-to-HTML Time
0.417914 milliseconds

This content has been proxied by September (3851b).