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