Makefile: add a target which will abort compilation with ancient shells
[git/dscho.git] / Documentation / git-help.txt
blobf414583fc48e85e4785fbf5f9431bb81a96ccd9d
1 git-help(1)
2 ===========
4 NAME
5 ----
6 git-help - display help information about git
8 SYNOPSIS
9 --------
10 'git help' [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND]
12 DESCRIPTION
13 -----------
15 With no options and no COMMAND given, the synopsis of the 'git'
16 command and a list of the most commonly used git commands are printed
17 on the standard output.
19 If the option '--all' or '-a' is given, then all available commands are
20 printed on the standard output.
22 If a git command is named, a manual page for that command is brought
23 up. The 'man' program is used by default for this purpose, but this
24 can be overridden by other options or configuration variables.
26 Note that `git --help ...` is identical to `git help ...` because the
27 former is internally converted into the latter.
29 OPTIONS
30 -------
31 -a::
32 --all::
33         Prints all the available commands on the standard output. This
34         option supersedes any other option.
36 -i::
37 --info::
38         Display manual page for the command in the 'info' format. The
39         'info' program will be used for that purpose.
41 -m::
42 --man::
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.
47 By default the 'man' program will be used to display the manual page,
48 but the 'man.viewer' configuration variable may be used to choose
49 other display programs (see below).
51 -w::
52 --web::
53         Display manual page for the command in the 'web' (HTML)
54         format. A web browser will be used for that purpose.
56 The web browser can be specified using the configuration variable
57 'help.browser', or 'web.browser' if the former is not set. If none of
58 these config variables is set, the 'git-web--browse' helper script
59 (called by 'git-help') will pick a suitable default. See
60 linkgit:git-web--browse[1] for more information about this.
62 CONFIGURATION VARIABLES
63 -----------------------
65 help.format
66 ~~~~~~~~~~~
68 If no command line option is passed, the 'help.format' configuration
69 variable will be checked. The following values are supported for this
70 variable; they make 'git-help' behave as their corresponding command
71 line option:
73 * "man" corresponds to '-m|--man',
74 * "info" corresponds to '-i|--info',
75 * "web" or "html" correspond to '-w|--web'.
77 help.browser, web.browser and browser.<tool>.path
78 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 The 'help.browser', 'web.browser' and 'browser.<tool>.path' will also
81 be checked if the 'web' format is chosen (either by command line
82 option or configuration variable). See '-w|--web' in the OPTIONS
83 section above and linkgit:git-web--browse[1].
85 man.viewer
86 ~~~~~~~~~~
88 The 'man.viewer' config variable will be checked if the 'man' format
89 is chosen. The following values are currently supported:
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),
94 * "konqueror": use 'kfmclient' to open the man page in a new konqueror
95 tab (see 'Note about konqueror' below).
97 Values for other tools can be used if there is a corresponding
98 'man.<tool>.cmd' configuration entry (see below).
100 Multiple values may be given to the 'man.viewer' configuration
101 variable. Their corresponding programs will be tried in the order
102 listed in the configuration file.
104 For example, this configuration:
106 ------------------------------------------------
107         [man]
108                 viewer = konqueror
109                 viewer = woman
110 ------------------------------------------------
112 will try to use konqueror first. But this may fail (for example if
113 DISPLAY is not set) and in that case emacs' woman mode will be tried.
115 If everything fails the 'man' program will be tried anyway.
117 man.<tool>.path
118 ~~~~~~~~~~~~~~~
120 You can explicitly provide a full path to your preferred man viewer by
121 setting the configuration variable 'man.<tool>.path'. For example, you
122 can configure the absolute path to konqueror by setting
123 'man.konqueror.path'. Otherwise, 'git-help' assumes the tool is
124 available in PATH.
126 man.<tool>.cmd
127 ~~~~~~~~~~~~~~
129 When the man viewer, specified by the 'man.viewer' configuration
130 variables, is not among the supported ones, then the corresponding
131 'man.<tool>.cmd' configuration variable will be looked up. If this
132 variable exists then the specified tool will be treated as a custom
133 command and a shell eval will be used to run the command with the man
134 page passed as arguments.
136 Note about konqueror
137 ~~~~~~~~~~~~~~~~~~~~
139 When 'konqueror' is specified in the 'man.viewer' configuration
140 variable, we launch 'kfmclient' to try to open the man page on an
141 already opened konqueror in a new tab if possible.
143 For consistency, we also try such a trick if 'man.konqueror.path' is
144 set to something like 'A_PATH_TO/konqueror'. That means we will try to
145 launch 'A_PATH_TO/kfmclient' instead.
147 If you really want to use 'konqueror', then you can use something like
148 the following:
150 ------------------------------------------------
151         [man]
152                 viewer = konq
154         [man "konq"]
155                 cmd = A_PATH_TO/konqueror
156 ------------------------------------------------
158 Note about git config --global
159 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161 Note that all these configuration variables should probably be set
162 using the '--global' flag, for example like this:
164 ------------------------------------------------
165 $ git config --global help.format web
166 $ git config --global web.browser firefox
167 ------------------------------------------------
169 as they are probably more user specific than repository specific.
170 See linkgit:git-config[1] for more information about this.
172 Author
173 ------
174 Written by Junio C Hamano <gitster@pobox.com> and the git-list
175 <git@vger.kernel.org>.
177 Documentation
178 -------------
179 Initial documentation was part of the linkgit:git[1] man page.
180 Christian Couder <chriscool@tuxfamily.org> extracted and rewrote it a
181 little. Maintenance is done by the git-list <git@vger.kernel.org>.
185 Part of the linkgit:git[1] suite