aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-help.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-26 14:22:13 +0900
committerJunio C Hamano <gitster@pobox.com>2018-10-26 14:22:13 +0900
commit7752999cd6bbe1aff4e34f83ed078ffffc232667 (patch)
tree30af3445c8f1b76a70417b6ef3e71293a730c74e /Documentation/git-help.txt
parentd1f96fd84d362a31dd8a26ae18c10539e07cd600 (diff)
parent912104770d1b3b009a58e95ae57f6db65791b031 (diff)
downloadgit-7752999cd6bbe1aff4e34f83ed078ffffc232667.tar.gz
Merge branch 'rv/alias-help'
"git cmd --help" when "cmd" is aliased used to only say "cmd is aliased to ...". Now it shows that to the standard error stream and runs "git $cmd --help" where $cmd is the first word of the alias expansion. This could be misleading for those who alias a command with options (e.g. with "[alias] cpn = cherry-pick -n", "git cpn --help" would show the manual of "cherry-pick", and the reader would not be told to pay close attention to the part that describes the "--no-commit" option until closing the pager that showed the contents of the manual, if the pager is configured to restore the original screen, or would not be told at all, if the pager simply makes the message on the standard error scroll away. * rv/alias-help: git-help.txt: document "git help cmd" vs "git cmd --help" for aliases git.c: handle_alias: prepend alias info when first argument is -h help: redirect to aliased commands for "git cmd --help"
Diffstat (limited to 'Documentation/git-help.txt')
-rw-r--r--Documentation/git-help.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/git-help.txt b/Documentation/git-help.txt
index 206e3aef64..aab5453bbb 100644
--- a/Documentation/git-help.txt
+++ b/Documentation/git-help.txt
@@ -29,6 +29,10 @@ guide is brought up. The 'man' program is used by default for this
purpose, but this can be overridden by other options or configuration
variables.
+If an alias is given, git shows the definition of the alias on
+standard output. To get the manual page for the aliased command, use
+`git COMMAND --help`.
+
Note that `git --help ...` is identical to `git help ...` because the
former is internally converted into the latter.