6 git-help - Display help information about Git
11 'git help' [-a|--all] [--[no-]verbose] [--[no-]external-commands] [--[no-]aliases]
12 'git help' [[-i|--info] [-m|--man] [-w|--web]] [<command>|<guide>]
13 'git help' [-g|--guides]
14 'git help' [-c|--config]
19 With no options and no '<command>' or '<guide>' given, the synopsis of the 'git'
20 command and a list of the most commonly used Git commands are printed
21 on the standard output.
23 If the option `--all` or `-a` is given, all available commands are
24 printed on the standard output.
26 If the option `--guides` or `-g` is given, a list of the
27 Git concept guides is also printed on the standard output.
29 If a command, or a guide, is given, a manual page for that command or
30 guide is brought up. The 'man' program is used by default for this
31 purpose, but this can be overridden by other options or configuration
34 If an alias is given, git shows the definition of the alias on
35 standard output. To get the manual page for the aliased command, use
36 `git <command> --help`.
38 Note that `git --help ...` is identical to `git help ...` because the
39 former is internally converted into the latter.
41 To display the linkgit:git[1] man page, use `git help git`.
43 This page can be displayed with 'git help help' or `git help --help`
49 Prints all the available commands on the standard output.
51 --no-external-commands::
52 When used with `--all`, exclude the listing of external "git-*"
53 commands found in the `$PATH`.
56 When used with `--all`, exclude the listing of configured
60 When used with `--all` print description for all recognized
61 commands. This is the default.
65 List all available configuration variables. This is a short
66 summary of the list in linkgit:git-config[1].
70 Prints a list of the Git concept guides on the standard output.
74 Display manual page for the command in the 'info' format. The
75 'info' program will be used for that purpose.
79 Display manual page for the command in the 'man' format. This
80 option may be used to override a value set in the
81 `help.format` configuration variable.
83 By default the 'man' program will be used to display the manual page,
84 but the `man.viewer` configuration variable may be used to choose
85 other display programs (see below).
89 Display manual page for the command in the 'web' (HTML)
90 format. A web browser will be used for that purpose.
92 The web browser can be specified using the configuration variable
93 `help.browser`, or `web.browser` if the former is not set. If none of
94 these config variables is set, the 'git web{litdd}browse' helper script
95 (called by 'git help') will pick a suitable default. See
96 linkgit:git-web{litdd}browse[1] for more information about this.
98 CONFIGURATION VARIABLES
99 -----------------------
104 If no command-line option is passed, the `help.format` configuration
105 variable will be checked. The following values are supported for this
106 variable; they make 'git help' behave as their corresponding command-
109 * "man" corresponds to '-m|--man',
110 * "info" corresponds to '-i|--info',
111 * "web" or "html" correspond to '-w|--web'.
113 help.browser, web.browser and browser.<tool>.path
114 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116 The `help.browser`, `web.browser` and `browser.<tool>.path` will also
117 be checked if the 'web' format is chosen (either by command-line
118 option or configuration variable). See '-w|--web' in the OPTIONS
119 section above and linkgit:git-web{litdd}browse[1].
124 The `man.viewer` configuration variable will be checked if the 'man'
125 format is chosen. The following values are currently supported:
127 * "man": use the 'man' program as usual,
128 * "woman": use 'emacsclient' to launch the "woman" mode in emacs
129 (this only works starting with emacsclient versions 22),
130 * "konqueror": use 'kfmclient' to open the man page in a new konqueror
131 tab (see 'Note about konqueror' below).
133 Values for other tools can be used if there is a corresponding
134 `man.<tool>.cmd` configuration entry (see below).
136 Multiple values may be given to the `man.viewer` configuration
137 variable. Their corresponding programs will be tried in the order
138 listed in the configuration file.
140 For example, this configuration:
142 ------------------------------------------------
146 ------------------------------------------------
148 will try to use konqueror first. But this may fail (for example, if
149 DISPLAY is not set) and in that case emacs' woman mode will be tried.
151 If everything fails, or if no viewer is configured, the viewer specified
152 in the `GIT_MAN_VIEWER` environment variable will be tried. If that
153 fails too, the 'man' program will be tried anyway.
158 You can explicitly provide a full path to your preferred man viewer by
159 setting the configuration variable `man.<tool>.path`. For example, you
160 can configure the absolute path to konqueror by setting
161 'man.konqueror.path'. Otherwise, 'git help' assumes the tool is
167 When the man viewer, specified by the `man.viewer` configuration
168 variables, is not among the supported ones, then the corresponding
169 `man.<tool>.cmd` configuration variable will be looked up. If this
170 variable exists then the specified tool will be treated as a custom
171 command and a shell eval will be used to run the command with the man
172 page passed as arguments.
177 When 'konqueror' is specified in the `man.viewer` configuration
178 variable, we launch 'kfmclient' to try to open the man page on an
179 already opened konqueror in a new tab if possible.
181 For consistency, we also try such a trick if 'man.konqueror.path' is
182 set to something like `A_PATH_TO/konqueror`. That means we will try to
183 launch `A_PATH_TO/kfmclient` instead.
185 If you really want to use 'konqueror', then you can use something like
188 ------------------------------------------------
193 cmd = A_PATH_TO/konqueror
194 ------------------------------------------------
196 Note about git config --global
197 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
199 Note that all these configuration variables should probably be set
200 using the `--global` flag, for example like this:
202 ------------------------------------------------
203 $ git config --global help.format web
204 $ git config --global web.browser firefox
205 ------------------------------------------------
207 as they are probably more user specific than repository specific.
208 See linkgit:git-config[1] for more information about this.
212 Part of the linkgit:git[1] suite