Skip to content

Commit bdb3033

Browse files
committed
Merge branch 'jc/maint-abbrev-option-cli' into maint-1.7.11
We did not document that many commands take unique prefix abbreviations of long options (e.g. "--option" may be the only flag that the command accepts that begin with "--opt", in which case you can give "--opt") anywhere easy to find for new people. * jc/maint-abbrev-option-cli: gitcli: describe abbreviation of long options
2 parents 7939a33 + 9c81990 commit bdb3033

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Documentation/gitcli.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ scripting git:
6262
`git log -1 HEAD` but write `git log -1 HEAD --`; the former will not work
6363
if you happen to have a file called `HEAD` in the work tree.
6464

65+
* many commands allow a long option "--option" to be abbreviated
66+
only to their unique prefix (e.g. if there is no other option
67+
whose name begins with "opt", you may be able to spell "--opt" to
68+
invoke the "--option" flag), but you should fully spell them out
69+
when writing your scripts; later versions of Git may introduce a
70+
new option whose name shares the same prefix, e.g. "--optimize",
71+
to make a short prefix that used to be unique no longer unique.
72+
6573

6674
ENHANCED OPTION PARSER
6775
----------------------

0 commit comments

Comments
 (0)