File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed
Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -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,15 +73,20 @@ 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 `--only` 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
Original file line number Diff line number Diff line change 33# Copyright (c) 2005 Linus Torvalds
44# Copyright (c) 2006 Junio C Hamano
55
6- USAGE=' [-a] [-i] [- s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-e] [--author <author>] [<path>...]'
6+ USAGE=' [-a] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-e] [--author <author>] [[-i | -o] <path>...]'
77SUBDIRECTORY_OK=Yes
88. git-sh-setup
99
@@ -340,11 +340,8 @@ case "$#,$also$only" in
3403400,)
341341 ;;
342342* ,)
343- echo >&2 " assuming --include paths..."
344- also=t
345- # Later when switch the defaults, we will replace them with these:
346- # echo >&2 "assuming --only paths..."
347- # also=
343+ echo >&2 " assuming --only paths..."
344+ also=
348345
349346 # If we are going to launch an editor, the message won't be
350347 # shown without this...
You can’t perform that action at this time.
0 commit comments