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>|<doc>]
13 'git help' [-g|--guides]
14 'git help' [-c|--config]
15 'git help' [--user-interfaces]
16 'git help' [--developer-interfaces]
21 With no options and no '<command>' or '<doc>' given, the synopsis of the 'git'
22 command and a list of the most commonly used Git commands are printed
23 on the standard output.
25 If the option `--all` or `-a` is given, all available commands are
26 printed on the standard output.
28 If the option `--guides` or `-g` is given, a list of the
29 Git concept guides is also printed on the standard output.
31 If a command or other documentation is given, the relevant manual page
32 will be brought up. The 'man' program is used by default for this
33 purpose, but this can be overridden by other options or configuration
36 If an alias is given, git shows the definition of the alias on
37 standard output. To get the manual page for the aliased command, use
38 `git <command> --help`.
40 Note that `git --help ...` is identical to `git help ...` because the
41 former is internally converted into the latter.
43 To display the linkgit:git[1] man page, use `git help git`.
45 This page can be displayed with 'git help help' or `git help --help`
51 Prints all the available commands on the standard output.
53 --no-external-commands::
54 When used with `--all`, exclude the listing of external "git-*"
55 commands found in the `$PATH`.
58 When used with `--all`, exclude the listing of configured
62 When used with `--all` print description for all recognized
63 commands. This is the default.
67 List all available configuration variables. This is a short
68 summary of the list in linkgit:git-config[1].
72 Prints a list of the Git concept guides on the standard output.
75 Prints a list of the repository, command and file interfaces
76 documentation on the standard output.
78 In-repository file interfaces such as `.git/info/exclude` are
79 documented here (see linkgit:gitrepository-layout[5]), as well as
80 in-tree configuration such as `.mailmap` (see linkgit:gitmailmap[5]).
82 This section of the documentation also covers general or widespread
83 user-interface conventions (e.g. linkgit:gitcli[7]), and
84 pseudo-configuration such as the file-based `.git/hooks/*` interface
85 described in linkgit:githooks[5].
87 --developer-interfaces::
88 Print list of file formats, protocols and other developer
89 interfaces documentation on the standard output.
93 Display manual page for the command in the 'info' format. The
94 'info' program will be used for that purpose.
98 Display manual page for the command in the 'man' format. This
99 option may be used to override a value set in the
100 `help.format` configuration variable.
102 By default the 'man' program will be used to display the manual page,
103 but the `man.viewer` configuration variable may be used to choose
104 other display programs (see below).
108 Display manual page for the command in the 'web' (HTML)
109 format. A web browser will be used for that purpose.
111 The web browser can be specified using the configuration variable
112 `help.browser`, or `web.browser` if the former is not set. If none of
113 these config variables is set, the 'git web{litdd}browse' helper script
114 (called by 'git help') will pick a suitable default. See
115 linkgit:git-web{litdd}browse[1] for more information about this.
117 CONFIGURATION VARIABLES
118 -----------------------
123 If no command-line option is passed, the `help.format` configuration
124 variable will be checked. The following values are supported for this
125 variable; they make 'git help' behave as their corresponding command-
128 * "man" corresponds to '-m|--man',
129 * "info" corresponds to '-i|--info',
130 * "web" or "html" correspond to '-w|--web'.
132 help.browser, web.browser and browser.<tool>.path
133 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 The `help.browser`, `web.browser` and `browser.<tool>.path` will also
136 be checked if the 'web' format is chosen (either by command-line
137 option or configuration variable). See '-w|--web' in the OPTIONS
138 section above and linkgit:git-web{litdd}browse[1].
143 The `man.viewer` configuration variable will be checked if the 'man'
144 format is chosen. The following values are currently supported:
146 * "man": use the 'man' program as usual,
147 * "woman": use 'emacsclient' to launch the "woman" mode in emacs
148 (this only works starting with emacsclient versions 22),
149 * "konqueror": use 'kfmclient' to open the man page in a new konqueror
150 tab (see 'Note about konqueror' below).
152 Values for other tools can be used if there is a corresponding
153 `man.<tool>.cmd` configuration entry (see below).
155 Multiple values may be given to the `man.viewer` configuration
156 variable. Their corresponding programs will be tried in the order
157 listed in the configuration file.
159 For example, this configuration:
161 ------------------------------------------------
165 ------------------------------------------------
167 will try to use konqueror first. But this may fail (for example, if
168 DISPLAY is not set) and in that case emacs' woman mode will be tried.
170 If everything fails, or if no viewer is configured, the viewer specified
171 in the `GIT_MAN_VIEWER` environment variable will be tried. If that
172 fails too, the 'man' program will be tried anyway.
177 You can explicitly provide a full path to your preferred man viewer by
178 setting the configuration variable `man.<tool>.path`. For example, you
179 can configure the absolute path to konqueror by setting
180 'man.konqueror.path'. Otherwise, 'git help' assumes the tool is
186 When the man viewer, specified by the `man.viewer` configuration
187 variables, is not among the supported ones, then the corresponding
188 `man.<tool>.cmd` configuration variable will be looked up. If this
189 variable exists then the specified tool will be treated as a custom
190 command and a shell eval will be used to run the command with the man
191 page passed as arguments.
196 When 'konqueror' is specified in the `man.viewer` configuration
197 variable, we launch 'kfmclient' to try to open the man page on an
198 already opened konqueror in a new tab if possible.
200 For consistency, we also try such a trick if 'man.konqueror.path' is
201 set to something like `A_PATH_TO/konqueror`. That means we will try to
202 launch `A_PATH_TO/kfmclient` instead.
204 If you really want to use 'konqueror', then you can use something like
207 ------------------------------------------------
212 cmd = A_PATH_TO/konqueror
213 ------------------------------------------------
215 Note about git config --global
216 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
218 Note that all these configuration variables should probably be set
219 using the `--global` flag, for example like this:
221 ------------------------------------------------
222 $ git config --global help.format web
223 $ git config --global web.browser firefox
224 ------------------------------------------------
226 as they are probably more user specific than repository specific.
227 See linkgit:git-config[1] for more information about this.
231 Part of the linkgit:git[1] suite