Skip to content

Commit 5604e4e

Browse files
MikeMcC399aduh95
authored andcommitted
doc: add contributing detail for git Signed-off-by trailer
Add -s option to examples using git commit Add description for git commit -s Signed-off-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> PR-URL: #64862 Fixes: #64799 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent fa6075f commit 5604e4e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

doc/contributing/pull-requests.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ to review changes that are split across multiple commits.
151151

152152
```bash
153153
git add my/changed/files
154-
git commit
154+
git commit -s
155155
```
156156

157157
Multiple commits often get squashed when they are landed. See the
@@ -206,6 +206,9 @@ A good commit message should describe what changed and why.
206206
This rule does not apply to dependency updates (e.g. cherry-picks), release
207207
commits, or backport commits.
208208

209+
[`git commit -s`][git commit -s] (with lowercase `s`) adds a
210+
`Signed-off-by` trailer at the end of the commit log message.
211+
209212
Sample final commit message after landing:
210213

211214
```text
@@ -312,7 +315,7 @@ GitHub will automatically update the pull request.
312315

313316
```bash
314317
git add my/changed/files
315-
git commit
318+
git commit -s
316319
git push origin my-branch
317320
```
318321

@@ -617,6 +620,7 @@ More than one subsystem may be valid for any particular issue or pull request.
617620
[approved]: #getting-approvals-for-your-pull-request
618621
[benchmark results]: writing-and-running-benchmarks.md
619622
[collaborator guide]: collaborator-guide.md
623+
[git commit -s]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s
620624
[guide for writing tests in Node.js]: writing-tests.md
621625
[hiding-a-comment]: https://help.github.com/articles/managing-disruptive-comments/#hiding-a-comment
622626
[https://ci.nodejs.org/]: https://ci.nodejs.org/

0 commit comments

Comments
 (0)