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