Skip to content

Commit 71ce3c5

Browse files
committed
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>
1 parent 598693b commit 71ce3c5

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

@@ -625,3 +628,4 @@ More than one subsystem may be valid for any particular issue or pull request.
625628
[nodejs/core-validate-commit]: https://github.com/nodejs/core-validate-commit/blob/main/lib/rules/subsystem.js
626629
[pull request template]: https://raw.githubusercontent.com/nodejs/node/HEAD/.github/PULL_REQUEST_TEMPLATE.md
627630
[running tests]: ../../BUILDING.md#running-tests
631+
[git commit -s]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s

0 commit comments

Comments
 (0)