]> git.ipfire.org Git - thirdparty/git.git/blob - Documentation/git-help.txt
Merge branch 'js/larger-timestamps'
[thirdparty/git.git] / Documentation / git-help.txt
1 git-help(1)
2 ===========
3
4 NAME
5 ----
6 git-help - Display help information about Git
7
8 SYNOPSIS
9 --------
10 [verse]
11 'git help' [-a|--all [--verbose]] [-g|--guide]
12 [-i|--info|-m|--man|-w|--web] [COMMAND|GUIDE]
13
14 DESCRIPTION
15 -----------
16
17 With no options and no COMMAND or GUIDE given, the synopsis of the 'git'
18 command and a list of the most commonly used Git commands are printed
19 on the standard output.
20
21 If the option `--all` or `-a` is given, all available commands are
22 printed on the standard output.
23
24 If the option `--guide` or `-g` is given, a list of the useful
25 Git guides is also printed on the standard output.
26
27 If a command, or a guide, is given, a manual page for that command or
28 guide is brought up. The 'man' program is used by default for this
29 purpose, but this can be overridden by other options or configuration
30 variables.
31
32 Note that `git --help ...` is identical to `git help ...` because the
33 former is internally converted into the latter.
34
35 To display the linkgit:git[1] man page, use `git help git`.
36
37 This page can be displayed with 'git help help' or `git help --help`
38
39 OPTIONS
40 -------
41 -a::
42 --all::
43 Prints all the available commands on the standard output. This
44 option overrides any given command or guide name.
45 When used with `--verbose` print description for all recognized
46 commands.
47
48 -c::
49 --config::
50 List all available configuration variables. This is a short
51 summary of the list in linkgit:git-config[1].
52
53 -g::
54 --guides::
55 Prints a list of useful guides on the standard output. This
56 option overrides any given command or guide name.
57
58 -i::
59 --info::
60 Display manual page for the command in the 'info' format. The
61 'info' program will be used for that purpose.
62
63 -m::
64 --man::
65 Display manual page for the command in the 'man' format. This
66 option may be used to override a value set in the
67 `help.format` configuration variable.
68 +
69 By default the 'man' program will be used to display the manual page,
70 but the `man.viewer` configuration variable may be used to choose
71 other display programs (see below).
72
73 -w::
74 --web::
75 Display manual page for the command in the 'web' (HTML)
76 format. A web browser will be used for that purpose.
77 +
78 The web browser can be specified using the configuration variable
79 `help.browser`, or `web.browser` if the former is not set. If none of
80 these config variables is set, the 'git web{litdd}browse' helper script
81 (called by 'git help') will pick a suitable default. See
82 linkgit:git-web{litdd}browse[1] for more information about this.
83
84 CONFIGURATION VARIABLES
85 -----------------------
86
87 help.format
88 ~~~~~~~~~~~
89
90 If no command-line option is passed, the `help.format` configuration
91 variable will be checked. The following values are supported for this
92 variable; they make 'git help' behave as their corresponding command-
93 line option:
94
95 * "man" corresponds to '-m|--man',
96 * "info" corresponds to '-i|--info',
97 * "web" or "html" correspond to '-w|--web'.
98
99 help.browser, web.browser and browser.<tool>.path
100 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101
102 The `help.browser`, `web.browser` and `browser.<tool>.path` will also
103 be checked if the 'web' format is chosen (either by command-line
104 option or configuration variable). See '-w|--web' in the OPTIONS
105 section above and linkgit:git-web{litdd}browse[1].
106
107 man.viewer
108 ~~~~~~~~~~
109
110 The `man.viewer` configuration variable will be checked if the 'man'
111 format is chosen. The following values are currently supported:
112
113 * "man": use the 'man' program as usual,
114 * "woman": use 'emacsclient' to launch the "woman" mode in emacs
115 (this only works starting with emacsclient versions 22),
116 * "konqueror": use 'kfmclient' to open the man page in a new konqueror
117 tab (see 'Note about konqueror' below).
118
119 Values for other tools can be used if there is a corresponding
120 `man.<tool>.cmd` configuration entry (see below).
121
122 Multiple values may be given to the `man.viewer` configuration
123 variable. Their corresponding programs will be tried in the order
124 listed in the configuration file.
125
126 For example, this configuration:
127
128 ------------------------------------------------
129 [man]
130 viewer = konqueror
131 viewer = woman
132 ------------------------------------------------
133
134 will try to use konqueror first. But this may fail (for example, if
135 DISPLAY is not set) and in that case emacs' woman mode will be tried.
136
137 If everything fails, or if no viewer is configured, the viewer specified
138 in the `GIT_MAN_VIEWER` environment variable will be tried. If that
139 fails too, the 'man' program will be tried anyway.
140
141 man.<tool>.path
142 ~~~~~~~~~~~~~~~
143
144 You can explicitly provide a full path to your preferred man viewer by
145 setting the configuration variable `man.<tool>.path`. For example, you
146 can configure the absolute path to konqueror by setting
147 'man.konqueror.path'. Otherwise, 'git help' assumes the tool is
148 available in PATH.
149
150 man.<tool>.cmd
151 ~~~~~~~~~~~~~~
152
153 When the man viewer, specified by the `man.viewer` configuration
154 variables, is not among the supported ones, then the corresponding
155 `man.<tool>.cmd` configuration variable will be looked up. If this
156 variable exists then the specified tool will be treated as a custom
157 command and a shell eval will be used to run the command with the man
158 page passed as arguments.
159
160 Note about konqueror
161 ~~~~~~~~~~~~~~~~~~~~
162
163 When 'konqueror' is specified in the `man.viewer` configuration
164 variable, we launch 'kfmclient' to try to open the man page on an
165 already opened konqueror in a new tab if possible.
166
167 For consistency, we also try such a trick if 'man.konqueror.path' is
168 set to something like 'A_PATH_TO/konqueror'. That means we will try to
169 launch 'A_PATH_TO/kfmclient' instead.
170
171 If you really want to use 'konqueror', then you can use something like
172 the following:
173
174 ------------------------------------------------
175 [man]
176 viewer = konq
177
178 [man "konq"]
179 cmd = A_PATH_TO/konqueror
180 ------------------------------------------------
181
182 Note about git config --global
183 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
184
185 Note that all these configuration variables should probably be set
186 using the `--global` flag, for example like this:
187
188 ------------------------------------------------
189 $ git config --global help.format web
190 $ git config --global web.browser firefox
191 ------------------------------------------------
192
193 as they are probably more user specific than repository specific.
194 See linkgit:git-config[1] for more information about this.
195
196 GIT
197 ---
198 Part of the linkgit:git[1] suite