Git send-email with format-patch3 December 2022, on Olivier's log
Git ships with built-in tools for collaborating over email. Sourcehut made a decent tutorial for it:
I was successful following the tutorial and submitting a couple of patches. However after a couple of mistakes, here is my own workflow for working with git send-email:
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 "firstname.lastname@example.org" 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.