]>
Commit | Line | Data |
---|---|---|
0f6f195b | 1 | git-help(1) |
dada0c12 | 2 | =========== |
0f6f195b CC |
3 | |
4 | NAME | |
5 | ---- | |
2de9b711 | 6 | git-help - Display help information about Git |
0f6f195b CC |
7 | |
8 | SYNOPSIS | |
9 | -------- | |
7791a1d9 | 10 | [verse] |
1ce59013 | 11 | 'git help' [-a|--all] [--[no-]verbose] [--[no-]external-commands] [--[no-]aliases] |
dba1e539 | 12 | 'git help' [[-i|--info] [-m|--man] [-w|--web]] [<command>|<doc>] |
9856ea67 | 13 | 'git help' [-g|--guides] |
1ed4bef6 | 14 | 'git help' [-c|--config] |
d976c510 | 15 | 'git help' [--user-interfaces] |
844739ba | 16 | 'git help' [--developer-interfaces] |
0f6f195b CC |
17 | |
18 | DESCRIPTION | |
19 | ----------- | |
20 | ||
dba1e539 | 21 | With no options and no '<command>' or '<doc>' given, the synopsis of the 'git' |
2de9b711 | 22 | command and a list of the most commonly used Git commands are printed |
0f6f195b CC |
23 | on the standard output. |
24 | ||
bcf9626a | 25 | If the option `--all` or `-a` is given, all available commands are |
0f6f195b CC |
26 | printed on the standard output. |
27 | ||
0371a764 PB |
28 | If the option `--guides` or `-g` is given, a list of the |
29 | Git concept guides is also printed on the standard output. | |
a133737b | 30 | |
dba1e539 ÆAB |
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 | |
a133737b PO |
33 | purpose, but this can be overridden by other options or configuration |
34 | variables. | |
0f6f195b | 35 | |
91210477 RV |
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 | |
49cbad0e | 38 | `git <command> --help`. |
91210477 | 39 | |
db5d6666 | 40 | Note that `git --help ...` is identical to `git help ...` because the |
0f6f195b CC |
41 | former is internally converted into the latter. |
42 | ||
a133737b PO |
43 | To display the linkgit:git[1] man page, use `git help git`. |
44 | ||
45 | This page can be displayed with 'git help help' or `git help --help` | |
46 | ||
0f6f195b CC |
47 | OPTIONS |
48 | ------- | |
3240240f SB |
49 | -a:: |
50 | --all:: | |
5e8068b7 | 51 | Prints all the available commands on the standard output. |
26c7d067 | 52 | |
1ce59013 ÆAB |
53 | --no-external-commands:: |
54 | When used with `--all`, exclude the listing of external "git-*" | |
55 | commands found in the `$PATH`. | |
56 | ||
57 | --no-aliases:: | |
58 | When used with `--all`, exclude the listing of configured | |
59 | aliases. | |
60 | ||
26c7d067 NTND |
61 | --verbose:: |
62 | When used with `--all` print description for all recognized | |
63 | commands. This is the default. | |
a133737b | 64 | |
3ac68a93 NTND |
65 | -c:: |
66 | --config:: | |
67 | List all available configuration variables. This is a short | |
68 | summary of the list in linkgit:git-config[1]. | |
69 | ||
a133737b PO |
70 | -g:: |
71 | --guides:: | |
9856ea67 | 72 | Prints a list of the Git concept guides on the standard output. |
0f6f195b | 73 | |
d976c510 ÆAB |
74 | --user-interfaces:: |
75 | Prints a list of the repository, command and file interfaces | |
76 | documentation on the standard output. | |
77 | + | |
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]). | |
81 | + | |
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]. | |
86 | ||
844739ba ÆAB |
87 | --developer-interfaces:: |
88 | Print list of file formats, protocols and other developer | |
89 | interfaces documentation on the standard output. | |
90 | ||
3240240f SB |
91 | -i:: |
92 | --info:: | |
b5578f33 CC |
93 | Display manual page for the command in the 'info' format. The |
94 | 'info' program will be used for that purpose. | |
45533d26 | 95 | |
3240240f SB |
96 | -m:: |
97 | --man:: | |
b5578f33 CC |
98 | Display manual page for the command in the 'man' format. This |
99 | option may be used to override a value set in the | |
ae9f6311 | 100 | `help.format` configuration variable. |
b5578f33 CC |
101 | + |
102 | By default the 'man' program will be used to display the manual page, | |
ae9f6311 | 103 | but the `man.viewer` configuration variable may be used to choose |
b8322ea8 | 104 | other display programs (see below). |
70087cdb | 105 | |
3240240f SB |
106 | -w:: |
107 | --web:: | |
b5578f33 CC |
108 | Display manual page for the command in the 'web' (HTML) |
109 | format. A web browser will be used for that purpose. | |
c07a07c5 CC |
110 | + |
111 | The web browser can be specified using the configuration variable | |
ae9f6311 | 112 | `help.browser`, or `web.browser` if the former is not set. If none of |
28394787 | 113 | these config variables is set, the 'git web{litdd}browse' helper script |
0b444cdb | 114 | (called by 'git help') will pick a suitable default. See |
28394787 | 115 | linkgit:git-web{litdd}browse[1] for more information about this. |
c07a07c5 | 116 | |
70087cdb CC |
117 | CONFIGURATION VARIABLES |
118 | ----------------------- | |
119 | ||
b8322ea8 CC |
120 | help.format |
121 | ~~~~~~~~~~~ | |
122 | ||
ae9f6311 | 123 | If no command-line option is passed, the `help.format` configuration |
70087cdb | 124 | variable will be checked. The following values are supported for this |
06ab60c0 | 125 | variable; they make 'git help' behave as their corresponding command- |
70087cdb CC |
126 | line option: |
127 | ||
128 | * "man" corresponds to '-m|--man', | |
129 | * "info" corresponds to '-i|--info', | |
b5578f33 | 130 | * "web" or "html" correspond to '-w|--web'. |
70087cdb | 131 | |
b8322ea8 CC |
132 | help.browser, web.browser and browser.<tool>.path |
133 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
134 | ||
ae9f6311 | 135 | The `help.browser`, `web.browser` and `browser.<tool>.path` will also |
06ab60c0 | 136 | be checked if the 'web' format is chosen (either by command-line |
70087cdb | 137 | option or configuration variable). See '-w|--web' in the OPTIONS |
28394787 | 138 | section above and linkgit:git-web{litdd}browse[1]. |
70087cdb | 139 | |
b8322ea8 CC |
140 | man.viewer |
141 | ~~~~~~~~~~ | |
142 | ||
ae9f6311 | 143 | The `man.viewer` configuration variable will be checked if the 'man' |
06ab60c0 | 144 | format is chosen. The following values are currently supported: |
b5578f33 CC |
145 | |
146 | * "man": use the 'man' program as usual, | |
147 | * "woman": use 'emacsclient' to launch the "woman" mode in emacs | |
ba170517 | 148 | (this only works starting with emacsclient versions 22), |
0bb64009 | 149 | * "konqueror": use 'kfmclient' to open the man page in a new konqueror |
ba170517 | 150 | tab (see 'Note about konqueror' below). |
b5578f33 | 151 | |
0bb64009 | 152 | Values for other tools can be used if there is a corresponding |
ae9f6311 | 153 | `man.<tool>.cmd` configuration entry (see below). |
0bb64009 | 154 | |
ae9f6311 | 155 | Multiple values may be given to the `man.viewer` configuration |
0bb64009 CC |
156 | variable. Their corresponding programs will be tried in the order |
157 | listed in the configuration file. | |
b8322ea8 CC |
158 | |
159 | For example, this configuration: | |
160 | ||
0bb64009 | 161 | ------------------------------------------------ |
b8322ea8 CC |
162 | [man] |
163 | viewer = konqueror | |
164 | viewer = woman | |
0bb64009 | 165 | ------------------------------------------------ |
b8322ea8 | 166 | |
06ab60c0 | 167 | will try to use konqueror first. But this may fail (for example, if |
b8322ea8 CC |
168 | DISPLAY is not set) and in that case emacs' woman mode will be tried. |
169 | ||
5059a427 | 170 | If everything fails, or if no viewer is configured, the viewer specified |
47d81b5c | 171 | in the `GIT_MAN_VIEWER` environment variable will be tried. If that |
5059a427 | 172 | fails too, the 'man' program will be tried anyway. |
b8322ea8 | 173 | |
7e8114c0 CC |
174 | man.<tool>.path |
175 | ~~~~~~~~~~~~~~~ | |
176 | ||
177 | You can explicitly provide a full path to your preferred man viewer by | |
ae9f6311 | 178 | setting the configuration variable `man.<tool>.path`. For example, you |
7e8114c0 | 179 | can configure the absolute path to konqueror by setting |
0b444cdb | 180 | 'man.konqueror.path'. Otherwise, 'git help' assumes the tool is |
7e8114c0 CC |
181 | available in PATH. |
182 | ||
0bb64009 CC |
183 | man.<tool>.cmd |
184 | ~~~~~~~~~~~~~~ | |
185 | ||
ae9f6311 | 186 | When the man viewer, specified by the `man.viewer` configuration |
0bb64009 | 187 | variables, is not among the supported ones, then the corresponding |
ae9f6311 | 188 | `man.<tool>.cmd` configuration variable will be looked up. If this |
0bb64009 CC |
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. | |
192 | ||
193 | Note about konqueror | |
194 | ~~~~~~~~~~~~~~~~~~~~ | |
195 | ||
ae9f6311 | 196 | When 'konqueror' is specified in the `man.viewer` configuration |
0bb64009 CC |
197 | variable, we launch 'kfmclient' to try to open the man page on an |
198 | already opened konqueror in a new tab if possible. | |
199 | ||
200 | For consistency, we also try such a trick if 'man.konqueror.path' is | |
68ed71b5 CB |
201 | set to something like `A_PATH_TO/konqueror`. That means we will try to |
202 | launch `A_PATH_TO/kfmclient` instead. | |
0bb64009 CC |
203 | |
204 | If you really want to use 'konqueror', then you can use something like | |
205 | the following: | |
206 | ||
207 | ------------------------------------------------ | |
208 | [man] | |
209 | viewer = konq | |
210 | ||
211 | [man "konq"] | |
212 | cmd = A_PATH_TO/konqueror | |
213 | ------------------------------------------------ | |
214 | ||
b8322ea8 CC |
215 | Note about git config --global |
216 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
217 | ||
b5578f33 | 218 | Note that all these configuration variables should probably be set |
bcf9626a | 219 | using the `--global` flag, for example like this: |
70087cdb CC |
220 | |
221 | ------------------------------------------------ | |
222 | $ git config --global help.format web | |
223 | $ git config --global web.browser firefox | |
224 | ------------------------------------------------ | |
225 | ||
226 | as they are probably more user specific than repository specific. | |
5162e697 | 227 | See linkgit:git-config[1] for more information about this. |
70087cdb | 228 | |
0f6f195b CC |
229 | GIT |
230 | --- | |
9e1f0a85 | 231 | Part of the linkgit:git[1] suite |