@@ -8,8 +8,8 @@ git-commit - Record your changes
88SYNOPSIS
99--------
1010[verse]
11- 'git-commit' [-a] [-i] [- s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
12- [-e] [--author <author>] [--] <file>...
11+ 'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
12+ [-e] [--author <author>] [--] [[-i | -o ] <file>...]
1313
1414DESCRIPTION
1515-----------
@@ -73,19 +73,39 @@ OPTIONS
7373 commit the whole index. This is the traditional
7474 behaviour.
7575
76- --::
77- Do not interpret any more arguments as options.
78-
79- <file>...::
76+ -o|--only::
8077 Commit only the files specified on the command line.
8178 This format cannot be used during a merge, nor when the
8279 index and the latest commit does not match on the
8380 specified paths to avoid confusion.
8481
82+ --::
83+ Do not interpret any more arguments as options.
84+
85+ <file>...::
86+ Files to be committed. The meaning of these is
87+ different between `--include` and `--only`. Without
88+ either, it defaults `--include` semantics.
89+
8590If you make a commit and then found a mistake immediately after
8691that, you can recover from it with gitlink:git-reset[1].
8792
8893
94+ WARNING
95+ -------
96+
97+ The 1.2.0 and its maintenance series 1.2.X will keep the
98+ traditional `--include` semantics as the default when neither
99+ `--only` nor `--include` is specified and `paths...` are given.
100+ This *will* change during the development towards 1.3.0 in the
101+ 'master' branch of `git.git` repository. If you are using this
102+ command in your scripts, and you depend on the traditional
103+ `--include` semantics, please update them to explicitly ask for
104+ `--include` semantics. Also if you are used to making partial
105+ commit using `--include` semantics, please train your fingers to
106+ say `git commit --include paths...` (or `git commit -i paths...`).
107+
108+
89109Discussion
90110----------
91111
@@ -101,7 +121,7 @@ even the command is invoked from a subdirectory.
101121That is, update the specified paths to the index and then commit
102122the whole tree.
103123
104- `git commit paths...` largely bypasses the index file and
124+ `git commit --only paths...` largely bypasses the index file and
105125commits only the changes made to the specified paths. It has
106126however several safety valves to prevent confusion.
107127
0 commit comments