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