1GIT-HELP(1) Git Manual GIT-HELP(1)
2
3
4
6 git-help - display help information about git
7
9 git help [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND]
10
12 With no options and no COMMAND given, the synopsis of the git command
13 and a list of the most commonly used git commands are printed on the
14 standard output.
15
16 If the option --all or -a is given, then all available commands are
17 printed on the standard output.
18
19 If a git command is named, a manual page for that command is brought
20 up. The man program is used by default for this purpose, but this can
21 be overridden by other options or configuration variables.
22
23 Note that git --help ... is identical to git help ... because the
24 former is internally converted into the latter.
25
27 -a, --all
28 Prints all the available commands on the standard output. This
29 option supersedes any other option.
30
31 -i, --info
32 Display manual page for the command in the info format. The info
33 program will be used for that purpose.
34
35 -m, --man
36 Display manual page for the command in the man format. This option
37 may be used to override a value set in the help.format
38 configuration variable.
39
40 By default the man program will be used to display the manual page,
41 but the man.viewer configuration variable may be used to choose
42 other display programs (see below).
43
44 -w, --web
45 Display manual page for the command in the web (HTML) format. A web
46 browser will be used for that purpose.
47
48 The web browser can be specified using the configuration variable
49 help.browser, or web.browser if the former is not set. If none of
50 these config variables is set, the git web--browse helper script
51 (called by git help) will pick a suitable default. See git-
52 web--browse(1) for more information about this.
53
55 help.format
56 If no command line option is passed, the help.format configuration
57 variable will be checked. The following values are supported for this
58 variable; they make git help behave as their corresponding command line
59 option:
60
61 · "man" corresponds to -m|--man,
62
63 · "info" corresponds to -i|--info,
64
65 · "web" or "html" correspond to -w|--web.
66
67 help.browser, web.browser and browser.<tool>.path
68 The help.browser, web.browser and browser.<tool>.path will also be
69 checked if the web format is chosen (either by command line option or
70 configuration variable). See -w|--web in the OPTIONS section above and
71 git-web--browse(1).
72
73 man.viewer
74 The man.viewer config variable will be checked if the man format is
75 chosen. The following values are currently supported:
76
77 · "man": use the man program as usual,
78
79 · "woman": use emacsclient to launch the "woman" mode in emacs (this
80 only works starting with emacsclient versions 22),
81
82 · "konqueror": use kfmclient to open the man page in a new konqueror
83 tab (see Note about konqueror below).
84
85 Values for other tools can be used if there is a corresponding
86 man.<tool>.cmd configuration entry (see below).
87
88 Multiple values may be given to the man.viewer configuration variable.
89 Their corresponding programs will be tried in the order listed in the
90 configuration file.
91
92 For example, this configuration:
93
94 [man]
95 viewer = konqueror
96 viewer = woman
97
98
99 will try to use konqueror first. But this may fail (for example if
100 DISPLAY is not set) and in that case emacs' woman mode will be tried.
101
102 If everything fails, or if no viewer is configured, the viewer
103 specified in the GIT_MAN_VIEWER environment variable will be tried. If
104 that fails too, the man program will be tried anyway.
105
106 man.<tool>.path
107 You can explicitly provide a full path to your preferred man viewer by
108 setting the configuration variable man.<tool>.path. For example, you
109 can configure the absolute path to konqueror by setting
110 man.konqueror.path. Otherwise, git help assumes the tool is available
111 in PATH.
112
113 man.<tool>.cmd
114 When the man viewer, specified by the man.viewer configuration
115 variables, is not among the supported ones, then the corresponding
116 man.<tool>.cmd configuration variable will be looked up. If this
117 variable exists then the specified tool will be treated as a custom
118 command and a shell eval will be used to run the command with the man
119 page passed as arguments.
120
121 Note about konqueror
122 When konqueror is specified in the man.viewer configuration variable,
123 we launch kfmclient to try to open the man page on an already opened
124 konqueror in a new tab if possible.
125
126 For consistency, we also try such a trick if man.konqueror.path is set
127 to something like A_PATH_TO/konqueror. That means we will try to launch
128 A_PATH_TO/kfmclient instead.
129
130 If you really want to use konqueror, then you can use something like
131 the following:
132
133 [man]
134 viewer = konq
135
136 [man "konq"]
137 cmd = A_PATH_TO/konqueror
138
139
140 Note about git config --global
141 Note that all these configuration variables should probably be set
142 using the --global flag, for example like this:
143
144 $ git config --global help.format web
145 $ git config --global web.browser firefox
146
147
148 as they are probably more user specific than repository specific. See
149 git-config(1) for more information about this.
150
152 Written by Junio C Hamano <gitster@pobox.com[1]> and the git-list
153 <git@vger.kernel.org[2]>.
154
156 Initial documentation was part of the git(1) man page. Christian Couder
157 <chriscool@tuxfamily.org[3]> extracted and rewrote it a little.
158 Maintenance is done by the git-list <git@vger.kernel.org[2]>.
159
161 Part of the git(1) suite
162
164 1. gitster@pobox.com
165 mailto:gitster@pobox.com
166
167 2. git@vger.kernel.org
168 mailto:git@vger.kernel.org
169
170 3. chriscool@tuxfamily.org
171 mailto:chriscool@tuxfamily.org
172
173
174
175Git 1.7.4.4 04/11/2011 GIT-HELP(1)