I've got git installed on my mac and either forgot or decided not to install the local docs. On my windows install however, when I use git help command
it actually opens the corresponding documentation on kernel.org. Can this be configured for my mac install as well? If so how?
views:
31answers:
1You'll need to set the help.format
variable (git config --global help.format web
) or use the -w
option with the help command:
help.format
If no command line option is passed, the help.format configuration variable will be checked. The following values are supported for this variable; they make git help behave as their corresponding command line option:
* "man" corresponds to -m|--man, * "info" corresponds to -i|--info, * "web" or "html" correspond to -w|--web.
Here's the portion on -w
as well:
-w, --web
Display manual page for the command in the web (HTML) format. A web browser will be used for that purpose.
The web browser can be specified using the configuration variable help.browser, or web.browser if the former is not set. If none of these config variables is set, the git web--browse helper script (called by git help) will pick a suitable default. See git- web--browse(1) for more information about this.
I can't test it right now, but I'm fairly sure that on Windows, using the web help actually uses a local copy of the HTML docs (not from kernel.org as you said); this is good because those are the docs that correspond with your version of git, and you won't mistakenly read docs for a different version. Regardless, using -w
on OSX 10.6 for me loads local HTML docs as well.