summaryrefslogtreecommitdiff
path: root/Documentation/git-commit.txt
diff options
context:
space:
mode:
authorZheNing Hu <adlternative@gmail.com>2021-03-23 13:55:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-23 17:31:38 (GMT)
commit2daae3d1d1bf513f1e1c00f1e4df75e1cb500e0f (patch)
tree80c488543732db29ca376021d7fe39dcbe4f6e29 /Documentation/git-commit.txt
parent142430338477d9d1bb25be66267225fb58498d92 (diff)
downloadgit-2daae3d1d1bf513f1e1c00f1e4df75e1cb500e0f.zip
git-2daae3d1d1bf513f1e1c00f1e4df75e1cb500e0f.tar.gz
git-2daae3d1d1bf513f1e1c00f1e4df75e1cb500e0f.tar.bz2
commit: add --trailer option
Historically, Git has supported the 'Signed-off-by' commit trailer using the '--signoff' and the '-s' option from the command line. But users may need to provide other trailer information from the command line such as "Helped-by", "Reported-by", "Mentored-by", Now implement a new `--trailer <token>[(=|:)<value>]` option to pass other trailers to `interpret-trailers` and insert them into commit messages. Signed-off-by: ZheNing Hu <adlternative@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-commit.txt')
-rw-r--r--Documentation/git-commit.txt14
1 files changed, 13 insertions, 1 deletions
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 17150fa..3fe7ef3 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -14,7 +14,8 @@ SYNOPSIS
[--allow-empty-message] [--no-verify] [-e] [--author=<author>]
[--date=<date>] [--cleanup=<mode>] [--[no-]status]
[-i | -o] [--pathspec-from-file=<file> [--pathspec-file-nul]]
- [-S[<keyid>]] [--] [<pathspec>...]
+ [(--trailer <token>[(=|:)<value>])...] [-S[<keyid>]]
+ [--] [<pathspec>...]
DESCRIPTION
-----------
@@ -166,6 +167,17 @@ The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`.
include::signoff-option.txt[]
+--trailer <token>[(=|:)<value>]::
+ Specify a (<token>, <value>) pair that should be applied as a
+ trailer. (e.g. `git commit --trailer "Signed-off-by:C O Mitter \
+ <committer@example.com>" --trailer "Helped-by:C O Mitter \
+ <committer@example.com>"` will add the "Signed-off-by" trailer
+ and the "Helped-by" trailer to the commit message.)
+ The `trailer.*` configuration variables
+ (linkgit:git-interpret-trailers[1]) can be used to define if
+ a duplicated trailer is omitted, where in the run of trailers
+ each trailer would appear, and other details.
+
-n::
--no-verify::
This option bypasses the pre-commit and commit-msg hooks.