~ireas/guides

d51b597c42bcbe0a90f6c6b2328b54f1b0629ac4 — Robin Krahl 2 months ago 90af802
Add example for git send-email
1 files changed, 34 insertions(+), 0 deletions(-)

M contributing.md
M contributing.md => contributing.md +34 -0
@@ 50,6 50,40 @@ request-pull`][] to send a pull request to the mailing list.
If these options don’t work for you, just use your mail client to send a mail
with a link to your changes and a short description to the mailing list.

## git send-email Example

This example shows how to prepare a patch for the [merge-rs][] project.  First
you have to check out the Git repository and configure the mailing list address
and the subject prefix:

[merge-rs]: https://sr.ht/~ireas/merge-rs

```
$ git clone https://git.sr.ht/~ireas/merge-rs && cd merge-rs
$ git config sendemail.to "~ireas/public-inbox@lists.sr.ht"    # see README.md
$ git config format.subjectPrefix "PATCH merge-rs"             # only when sending to ~ireas/public-inbox@lists.sr.ht
```

Then you can make your changes, for example:

```
$ echo test > test.txt
$ git add test.txt
$ git commit -m "Test"
```

Use `git send-email` to generate a patch for the last commit and to send it to
the mailing list:

```
$ git send-email HEAD^
```

This example assumes that you have already [configured][] `git send-email` for
sending mails.

[configured]: https://git-send-email.io/#step-2

## Tips for git send-email

- Use the `sendemail.to` configuration option to set the mail address for your