summaryrefslogtreecommitdiff
path: root/Documentation/git-commit.txt
diff options
context:
space:
mode:
authorLibravatar Jiang Xin <zhiyou.jx@alibaba-inc.com>2019-12-30 08:47:27 +0800
committerLibravatar Jiang Xin <zhiyou.jx@alibaba-inc.com>2019-12-30 08:47:27 +0800
commit173fff68dabefc07c69b9d7b96eee06e3d506a20 (patch)
tree21f11b938a3150de572c12e61c187b33f2728d77 /Documentation/git-commit.txt
parentl10n: Update Catalan translation (diff)
parentGit 2.25-rc0 (diff)
downloadtgif-173fff68dabefc07c69b9d7b96eee06e3d506a20.tar.xz
Merge tag 'v2.25.0-rc0' into git-po-master
Git 2.25-rc0 * tag 'v2.25.0-rc0': (531 commits) Git 2.25-rc0 sparse-checkout: improve OS ls compatibility dir.c: use st_add3() for allocation size dir: consolidate similar code in treat_directory() dir: synchronize treat_leading_path() and read_directory_recursive() dir: fix checks on common prefix directory t4015: improve coverage of function context test commit: forbid --pathspec-from-file --all t3434: mark successful test as such notes.h: fix typos in comment t6030: don't create unused file t5580: don't create unused file t3501: don't create unused file bisect--helper: convert `*_warning` char pointers to char arrays. The sixth batch fix-typo: consecutive-word duplications Makefile: drop GEN_HDRS built-in add -p: show helpful hint when nothing can be staged built-in add -p: only show the applicable parts of the help text built-in add -p: implement the 'q' ("quit") command ...
Diffstat (limited to 'Documentation/git-commit.txt')
-rw-r--r--Documentation/git-commit.txt29
1 files changed, 22 insertions, 7 deletions
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index afa7b75a23..ced5a9beab 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -13,7 +13,8 @@ SYNOPSIS
[-F <file> | -m <msg>] [--reset-author] [--allow-empty]
[--allow-empty-message] [--no-verify] [-e] [--author=<author>]
[--date=<date>] [--cleanup=<mode>] [--[no-]status]
- [-i | -o] [-S[<keyid>]] [--] [<file>...]
+ [-i | -o] [--pathspec-from-file=<file> [--pathspec-file-nul]]
+ [-S[<keyid>]] [--] [<pathspec>...]
DESCRIPTION
-----------
@@ -278,6 +279,19 @@ FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].)
already been staged. If used together with `--allow-empty`
paths are also not required, and an empty commit will be created.
+--pathspec-from-file=<file>::
+ Pathspec is passed in `<file>` instead of commandline args. If
+ `<file>` is exactly `-` then standard input is used. Pathspec
+ elements are separated by LF or CR/LF. Pathspec elements can be
+ quoted as explained for the configuration variable `core.quotePath`
+ (see linkgit:git-config[1]). See also `--pathspec-file-nul` and
+ global `--literal-pathspecs`.
+
+--pathspec-file-nul::
+ Only meaningful with `--pathspec-from-file`. Pathspec elements are
+ separated with NUL character and all other characters are taken
+ literally (including newlines and quotes).
+
-u[<mode>]::
--untracked-files[=<mode>]::
Show untracked files.
@@ -345,12 +359,13 @@ changes to tracked files.
\--::
Do not interpret any more arguments as options.
-<file>...::
- When files are given on the command line, the command
- commits the contents of the named files, without
- recording the changes already staged. The contents of
- these files are also staged for the next commit on top
- of what have been staged before.
+<pathspec>...::
+ When pathspec is given on the command line, commit the contents of
+ the files that match the pathspec without recording the changes
+ already added to the index. The contents of these files are also
+ staged for the next commit on top of what have been staged before.
++
+For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
:git-commit: 1
include::date-formats.txt[]