From 49ac4f8ffdd6835105330a0151d62fcc5a47e83c Mon Sep 17 00:00:00 2001 From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Date: Fri, 31 Jul 2026 10:29:38 +0200 Subject: [PATCH] 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> --- doc/contributing/pull-requests.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/contributing/pull-requests.md b/doc/contributing/pull-requests.md index 447be02f6bac..77b9148213b7 100644 --- a/doc/contributing/pull-requests.md +++ b/doc/contributing/pull-requests.md @@ -151,7 +151,7 @@ to review changes that are split across multiple commits. ```bash git add my/changed/files -git commit +git commit -s ``` 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. This rule does not apply to dependency updates (e.g. cherry-picks), release commits, or backport commits. + [`git commit -s`][git commit -s] (with lowercase `s`) adds a + `Signed-off-by` trailer at the end of the commit log message. + Sample final commit message after landing: ```text @@ -312,7 +315,7 @@ GitHub will automatically update the pull request. ```bash git add my/changed/files -git commit +git commit -s git push origin my-branch ``` @@ -617,6 +620,7 @@ More than one subsystem may be valid for any particular issue or pull request. [approved]: #getting-approvals-for-your-pull-request [benchmark results]: writing-and-running-benchmarks.md [collaborator guide]: collaborator-guide.md +[git commit -s]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s [guide for writing tests in Node.js]: writing-tests.md [hiding-a-comment]: https://help.github.com/articles/managing-disruptive-comments/#hiding-a-comment [https://ci.nodejs.org/]: https://ci.nodejs.org/