The git help
command on Windows (msysgit
distribution) spawns web browser each time I run it. I tried git help -m
which reports "No manual entry for ..."
and git help -i
which says "info: Terminal type 'msys' is not smart enough to run Info."
The same happens in bash
under Cygwin
.
Is there any sensible way to get light-weight help in cmd
terminal?
World's most overengineered workaround for this problem: use WSL
(that is, unless you already are a WSL user, in which case it's merely an ordinary workaround)
bash -c 'git help fetch'
etc.Here's an alias for that last one:
(And no you can't override git built-ins, but you can make a shell command to intercept and reroute
help
.)Update for Git 2.x (June 2017, Git 2.13.1)
You still don't have man:
Same for
git <verb> --help
.git <verb> -h
does not print the man page, only the short usage section (nothing to do with man)No, even though an alternative, based on a 'cat' of the htlp txt files, is suggested in "how do I get git to show command-line help in windows?".
There
man.<tool>.cmd
config introduced in 2008, allows to set a custom command, but msys shell isn't shipped withman.exe
.git <verb> -h
shows a command usage in the same terminal window.On the other hand,
git <verb> --help
andgit help <verb>
open a browser.It works for particular commands:
git <command> -h
Edit, thanks to @the-happy-hippo
But it shows only a brief description, not the full one, as
git help <command>
orgit <command> --help
gives on Windows.