blob: a8ffcbe78b09a3a78cb8d46b799713251dac1d87 [file] [log] [blame]
Junio C Hamano58256872007-12-04 08:31:131git-help(1)
2===========
3
4NAME
5----
6git-help - display help information about git
7
8SYNOPSIS
9--------
Junio C Hamano3dac5042007-12-15 08:40:5410'git help' [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND]
Junio C Hamano58256872007-12-04 08:31:1311
12DESCRIPTION
13-----------
14
15With no options and no COMMAND given, the synopsis of the 'git'
16command and a list of the most commonly used git commands are printed
17on the standard output.
18
19If the option '--all' or '-a' is given, then all available commands are
20printed on the standard output.
21
22If a git command is named, a manual page for that command is brought
Junio C Hamano0c0da5f2007-12-13 02:45:3023up. The 'man' program is used by default for this purpose, but this
Junio C Hamanofe986052007-12-19 07:33:3824can be overridden by other options or configuration variables.
Junio C Hamano58256872007-12-04 08:31:1325
26Note that 'git --help ...' is identical as 'git help ...' because the
27former is internally converted into the latter.
28
29OPTIONS
30-------
31-a|--all::
Junio C Hamano58256872007-12-04 08:31:1332Prints all the available commands on the standard output. This
Junio C Hamanofe986052007-12-19 07:33:3833option supersedes any other option.
Junio C Hamano58256872007-12-04 08:31:1334
Junio C Hamano0c0da5f2007-12-13 02:45:3035-i|--info::
36Use the 'info' program to display the manual page, instead of
37the 'man' program that is used by default.
38
Junio C Hamano3dac5042007-12-15 08:40:5439-m|--man::
40Use the 'man' program to display the manual page. This may be
41used to override a value set in the 'help.format'
42configuration variable.
43
Junio C Hamano0c0da5f2007-12-13 02:45:3044-w|--web::
45Use a web browser to display the HTML manual page, instead of
46the 'man' program that is used by default.
47+
48The web browser can be specified using the configuration variable
49'help.browser', or 'web.browser' if the former is not set. If none of
Junio C Hamano42a2e2d2007-12-16 22:13:4250these config variables is set, the 'git-help--browse' helper script
Junio C Hamano3dac5042007-12-15 08:40:5451(called by 'git-help') will pick a suitable default.
Junio C Hamano0c0da5f2007-12-13 02:45:3052+
Junio C Hamanofe986052007-12-19 07:33:3853You can explicitly provide a full path to your preferred browser by
Junio C Hamano0c0da5f2007-12-13 02:45:3054setting the configuration variable 'browser.<tool>.path'. For example,
55you can configure the absolute path to firefox by setting
Junio C Hamano42a2e2d2007-12-16 22:13:4256'browser.firefox.path'. Otherwise, 'git-help--browse' assumes the tool
Junio C Hamano0c0da5f2007-12-13 02:45:3057is available in PATH.
58+
59Note that the script tries, as much as possible, to display the HTML
60page in a new tab on an already opened browser.
61
Junio C Hamano3dac5042007-12-15 08:40:5462CONFIGURATION VARIABLES
63-----------------------
64
65If no command line option is passed, the 'help.format' configuration
66variable will be checked. The following values are supported for this
67variable; they make 'git-help' behave as their corresponding command
68line option:
69
70* "man" corresponds to '-m|--man',
71* "info" corresponds to '-i|--info',
72* "web" or "html" correspond to '-w|--web',
73
74The 'help.browser', 'web.browser' and 'browser.<tool>.path' will also
Junio C Hamanofe986052007-12-19 07:33:3875be checked if the 'web' format is chosen (either by command line
Junio C Hamano3dac5042007-12-15 08:40:5476option or configuration variable). See '-w|--web' in the OPTIONS
77section above.
78
79Note that these configuration variables should probably be set using
80the '--global' flag, for example like this:
81
82------------------------------------------------
83$ git config --global help.format web
84$ git config --global web.browser firefox
85------------------------------------------------
86
87as they are probably more user specific than repository specific.
88See gitlink:git-config[1] for more information about this.
89
Junio C Hamano58256872007-12-04 08:31:1390Author
91------
92Written by Junio C Hamano <gitster@pobox.com> and the git-list
93<git@vger.kernel.org>.
94
95Documentation
96-------------
97Initial documentation was part of the gitlink:git[7] man page.
98Christian Couder <chriscool@tuxfamily.org> extracted and rewrote it a
99little. Maintenance is done by the git-list <git@vger.kernel.org>.
100
101GIT
102---
103Part of the gitlink:git[7] suite