~oliverpool/log.pfad.fr

8ccd7097e8d8126dd85e49dbdf08c9eae63e34d6 — oliverpool a month ago 3c09345
git send-email 2023
2 files changed, 35 insertions(+), 0 deletions(-)

M content/2022-12-03-git-send-email.gmi
A content/2023-05-03-git-send-email.gmi
M content/2022-12-03-git-send-email.gmi => content/2022-12-03-git-send-email.gmi +4 -0
@@ 2,6 2,10 @@
title: Git send-email with format-patch
---

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

> My outdate 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/


A content/2023-05-03-git-send-email.gmi => content/2023-05-03-git-send-email.gmi +31 -0
@@ 0,0 1,31 @@
---
title: Git send-email without format-patch
---

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 following the tutorial and submitting a couple of patches. After some attempts at improving my workflow, I think I will settle on the following:

## Adding a self-destructive message

If you add three dashes (---) on a dedicated line in your commit message, everything afterwards will be discarded when the patch is applied (using `git am`).

Commands after git clone:
```
# 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"
```

Commands to send the patch:
```
# Submit a patch
git --amend                     # add a self-destructive message under a --- line
git send-email origin/master    # send the patch as email
```

Yes, it means that I am back to 2 commands, while still being able to resume from where I left if anything fails.

=> /2022/git-send-email/ [Attempt 2022] Git send-email with format-patch