diff options
-rw-r--r-- | git.sr.ht/send-email.md | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/git.sr.ht/send-email.md b/git.sr.ht/send-email.md index db259d8..372b2a3 100644 --- a/git.sr.ht/send-email.md +++ b/git.sr.ht/send-email.md @@ -73,8 +73,8 @@ out these config fields in `~/.config/git/config`: [gmail]: https://www.git-scm.com/docs/git-send-email#_use_gmail_as_the_smtp_server You can also set your SMTP password as `sendemail.smtppass`. If you don't, you -will be prompted for it it's needed. You can also configure it to use your local -keyring; consult [`git credential`][git-credential] for details. +will be prompted for it when it's needed. You can also configure git to use your +local keyring; consult [`git credential`][git-credential] for details. [git-credential]: https://www.git-scm.com/docs/git-credential @@ -87,30 +87,29 @@ you're in a hurry, here are a few quick examples: - `HEAD^` just includes the last commit - `HEAD~3` includes the last three commits -- `origin/master` includes all commits you've authored since diverging from - `origin/master` +- `origin/master` includes all commits since diverging from `origin/master` [rev-spec]: https://www.git-scm.com/docs/gitrevisions The `--annotate` flag will open the emails in your text editor before sending them out. You should take a moment to review these. The subject line and everything above the `---` are your commit message, and everything below the -`---` is the patch itself. Immediately following the `---`, you should add what +`---` is the patch itself. Immediately following the `---`, you can add what we call "timely commentary" - any information which is useful to the people -reviewing your patch, but doesn't necessarily belong in the final git history. -If you're sending a few patches, you might also want to specify -`--cover-letter`, which will prepare an additional email summary to be sent -first. +reviewing your patch, but doesn't necessarily belong in the final git history; +plus a blank line between this and the start of the patch. If you're sending a +few patches at once, you might also want to specify `--cover-letter`, which will +prepare an additional email summary to be sent first. **Note**: When you're prompted for an "In-Reply-To" header, you can ignore it -the first time you send the patch. +for now. ## Handling feedback You will likely receive replies to your email with feedback on your changes. This is normal! Use tools like [`git commit --amend`][amend] and [`git -rebase`][git-rebase] to continue curating your patch set and iterating on -feedback (tip: check out our [rebase guide][rebase.md]). When you're ready to +rebase`][git-rebase] to continue improving your patch set and iterating on +feedback (tip: check out our [rebase guide](rebase.md)). When you're ready to submit the next version of your patches, use `git send-email` normally, except: - Add `-v2` to indicate that this is version 2 of your patch (or whatever number @@ -130,7 +129,7 @@ Here are a few extra tricks you might find useful with `git send-email`. ### Sending emails to the same address every time If you send emails for a project to the same mailing list every time, you might -find it useful to set the default `To` address. Run this command from that +find it useful to set the default To address. Run this command from that repository: git config sendemail.to patches@example.org @@ -197,10 +196,10 @@ In order to integrate the changes, you need to *apply* the patch. The tool for this is [`git am`][git-am]. The difficult part here is going to be obtaining a copy of the email to provide to `git am`. Some clients like [mutt][mutt] make this easy (in mutt, you can use the `|` key to pipe an email directly to `git -am`) or tools like [offlineimap][offlineimap] (or a combination of the two!). -Most popular end-user clients do not. If you're in this boat, the easiest way to -get a raw email is to use the "raw" link on lists.sr.ht, which is hidden away -under the "details" button. +am`), or tools like [offlineimap][offlineimap] can help (or a combination of the +two!). Most popular end-user clients do not provide this option. If you're in +this boat, the easiest way to get a raw email is to use the "raw" link on +lists.sr.ht, which is hidden away under the "details" button. [git-am]: https://www.git-scm.com/docs/git-am [mutt]: http://www.mutt.org @@ -212,9 +211,7 @@ like this: curl -s https://lists.sr.ht/... | git am You can also just run `git am` alone and paste the patch into it, followed by -Ctrl+D. - -You can then make these commits available upstream by using [`git +Ctrl+D. You can then make these commits available upstream by using [`git push`][git-push] normally. Don't forget to send the contributor a thank you email! |