]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-help.txt
Merge branch 'js/mingw-rename-fix' into maint
[thirdparty/git.git] / Documentation / git-help.txt
CommitLineData
0f6f195b 1git-help(1)
dada0c12 2===========
0f6f195b
CC
3
4NAME
5----
6git-help - display help information about git
7
8SYNOPSIS
9--------
70087cdb 10'git help' [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND]
0f6f195b
CC
11
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
45533d26 23up. The 'man' program is used by default for this purpose, but this
02ff6250 24can be overridden by other options or configuration variables.
0f6f195b 25
db5d6666 26Note that `git --help ...` is identical to `git help ...` because the
0f6f195b
CC
27former is internally converted into the latter.
28
29OPTIONS
30-------
3240240f
SB
31-a::
32--all::
0f6f195b 33 Prints all the available commands on the standard output. This
02ff6250 34 option supersedes any other option.
0f6f195b 35
3240240f
SB
36-i::
37--info::
b5578f33
CC
38 Display manual page for the command in the 'info' format. The
39 'info' program will be used for that purpose.
45533d26 40
3240240f
SB
41-m::
42--man::
b5578f33
CC
43 Display manual page for the command in the 'man' format. This
44 option may be used to override a value set in the
45 'help.format' configuration variable.
46+
47By default the 'man' program will be used to display the manual page,
48but the 'man.viewer' configuration variable may be used to choose
b8322ea8 49other display programs (see below).
70087cdb 50
3240240f
SB
51-w::
52--web::
b5578f33
CC
53 Display manual page for the command in the 'web' (HTML)
54 format. A web browser will be used for that purpose.
c07a07c5
CC
55+
56The web browser can be specified using the configuration variable
57'help.browser', or 'web.browser' if the former is not set. If none of
ba020ef5
JN
58these config variables is set, the 'git-web--browse' helper script
59(called by 'git-help') will pick a suitable default. See
cb45f83c 60linkgit:git-web--browse[1] for more information about this.
c07a07c5 61
70087cdb
CC
62CONFIGURATION VARIABLES
63-----------------------
64
b8322ea8
CC
65help.format
66~~~~~~~~~~~
67
70087cdb
CC
68If no command line option is passed, the 'help.format' configuration
69variable will be checked. The following values are supported for this
ba020ef5 70variable; they make 'git-help' behave as their corresponding command
70087cdb
CC
71line option:
72
73* "man" corresponds to '-m|--man',
74* "info" corresponds to '-i|--info',
b5578f33 75* "web" or "html" correspond to '-w|--web'.
70087cdb 76
b8322ea8
CC
77help.browser, web.browser and browser.<tool>.path
78~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79
70087cdb 80The 'help.browser', 'web.browser' and 'browser.<tool>.path' will also
02ff6250 81be checked if the 'web' format is chosen (either by command line
70087cdb 82option or configuration variable). See '-w|--web' in the OPTIONS
cb45f83c 83section above and linkgit:git-web--browse[1].
70087cdb 84
b8322ea8
CC
85man.viewer
86~~~~~~~~~~
87
b5578f33 88The 'man.viewer' config variable will be checked if the 'man' format
0bb64009 89is chosen. The following values are currently supported:
b5578f33
CC
90
91* "man": use the 'man' program as usual,
92* "woman": use 'emacsclient' to launch the "woman" mode in emacs
93(this only works starting with emacsclient versions 22),
0bb64009
CC
94* "konqueror": use 'kfmclient' to open the man page in a new konqueror
95tab (see 'Note about konqueror' below).
b5578f33 96
0bb64009
CC
97Values for other tools can be used if there is a corresponding
98'man.<tool>.cmd' configuration entry (see below).
99
100Multiple values may be given to the 'man.viewer' configuration
101variable. Their corresponding programs will be tried in the order
102listed in the configuration file.
b8322ea8
CC
103
104For example, this configuration:
105
0bb64009 106------------------------------------------------
b8322ea8
CC
107 [man]
108 viewer = konqueror
109 viewer = woman
0bb64009 110------------------------------------------------
b8322ea8
CC
111
112will try to use konqueror first. But this may fail (for example if
113DISPLAY is not set) and in that case emacs' woman mode will be tried.
114
63f671a4 115If everything fails the 'man' program will be tried anyway.
b8322ea8 116
7e8114c0
CC
117man.<tool>.path
118~~~~~~~~~~~~~~~
119
120You can explicitly provide a full path to your preferred man viewer by
121setting the configuration variable 'man.<tool>.path'. For example, you
122can configure the absolute path to konqueror by setting
467c0197 123'man.konqueror.path'. Otherwise, 'git-help' assumes the tool is
7e8114c0
CC
124available in PATH.
125
0bb64009
CC
126man.<tool>.cmd
127~~~~~~~~~~~~~~
128
129When the man viewer, specified by the 'man.viewer' configuration
130variables, is not among the supported ones, then the corresponding
131'man.<tool>.cmd' configuration variable will be looked up. If this
132variable exists then the specified tool will be treated as a custom
133command and a shell eval will be used to run the command with the man
134page passed as arguments.
135
136Note about konqueror
137~~~~~~~~~~~~~~~~~~~~
138
139When 'konqueror' is specified in the 'man.viewer' configuration
140variable, we launch 'kfmclient' to try to open the man page on an
141already opened konqueror in a new tab if possible.
142
143For consistency, we also try such a trick if 'man.konqueror.path' is
144set to something like 'A_PATH_TO/konqueror'. That means we will try to
145launch 'A_PATH_TO/kfmclient' instead.
146
147If you really want to use 'konqueror', then you can use something like
148the following:
149
150------------------------------------------------
151 [man]
152 viewer = konq
153
154 [man "konq"]
155 cmd = A_PATH_TO/konqueror
156------------------------------------------------
157
b8322ea8
CC
158Note about git config --global
159~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
160
b5578f33
CC
161Note that all these configuration variables should probably be set
162using the '--global' flag, for example like this:
70087cdb
CC
163
164------------------------------------------------
165$ git config --global help.format web
166$ git config --global web.browser firefox
167------------------------------------------------
168
169as they are probably more user specific than repository specific.
5162e697 170See linkgit:git-config[1] for more information about this.
70087cdb 171
0f6f195b
CC
172Author
173------
174Written by Junio C Hamano <gitster@pobox.com> and the git-list
175<git@vger.kernel.org>.
176
177Documentation
178-------------
9e1f0a85 179Initial documentation was part of the linkgit:git[1] man page.
0f6f195b
CC
180Christian Couder <chriscool@tuxfamily.org> extracted and rewrote it a
181little. Maintenance is done by the git-list <git@vger.kernel.org>.
182
183GIT
184---
9e1f0a85 185Part of the linkgit:git[1] suite