From 1ff466c018692d0ac7c5f30a449632659e87a73b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 27 Feb 2020 08:10:20 -0800 Subject: Documentation: clarify that `-h` alone stands for `help` We seem to be getting new users who get confused every 20 months or so with this "-h consistently wants to give help, but the commands to which `-h` may feel like a good short-form option want it to mean something else." compromise. Let's make sure that the readers know that `git cmd -h` (with no other arguments) is a way to get usage text, even for commands like ls-remote and grep. Also extend the description that is already in gitcli.txt, as it is clear that users still get confused with the current text. Signed-off-by: Junio C Hamano --- Documentation/gitcli.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation/gitcli.txt') diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt index 592e06d839..06608ea205 100644 --- a/Documentation/gitcli.txt +++ b/Documentation/gitcli.txt @@ -120,6 +120,11 @@ usage: git describe [] * --long always use long format --abbrev[=] use digits to display SHA-1s --------------------------------------------- ++ +Note that some subcommand (e.g. `git grep`) may behave differently +when there are things on the command line other than `-h`, but `git +subcmd -h` without anything else on the command line is meant to +consistently give the usage. --help-all:: Some Git commands take options that are only used for plumbing or that -- cgit v1.3