1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<h1>git-help</h1> <h2 id="_name">Name</h2> <div class="sectionbody"> <p>git-help - Display help information about Git</p> </div> <h2 id="_synopsis">Synopsis</h2> <div class="sectionbody"> <div class="verseblock"> <pre class="content" data-language="shell">git help [-a|--all] [--[no-]verbose] [--[no-]external-commands] [--[no-]aliases]
git help [[-i|--info] [-m|--man] [-w|--web]] [<command>|<doc>]
git help [-g|--guides]
git help [-c|--config]
git help [--user-interfaces]
git help [--developer-interfaces]</pre> </div> </div> <h2 id="_description">Description</h2> <div class="sectionbody"> <p>With no options and no <code><command></code> or <code><doc></code> given, the synopsis of the <code>git</code> command and a list of the most commonly used Git commands are printed on the standard output.</p> <p>If the option <code>--all</code> or <code>-a</code> is given, all available commands are printed on the standard output.</p> <p>If the option <code>--guides</code> or <code>-g</code> is given, a list of the Git concept guides is also printed on the standard output.</p> <p>If a command or other documentation is given, the relevant manual page will be brought up. The <code>man</code> program is used by default for this purpose, but this can be overridden by other options or configuration variables.</p> <p>If an alias is given, git shows the definition of the alias on standard output. To get the manual page for the aliased command, use <code>git <command> --help</code>.</p> <p>Note that <code>git --help ...</code> is identical to <code>git help ...</code> because the former is internally converted into the latter.</p> <p>To display the <a href="git">git[1]</a> man page, use <code>git help git</code>.</p> <p>This page can be displayed with <code>git help help</code> or <code>git help --help</code>.</p> </div> <h2 id="_options">Options</h2> <div class="sectionbody"> <div class="dlist"> <dl> <dt class="hdlist1" id="Documentation/git-help.txt--a"> -a </dt> <dt class="hdlist1" id="Documentation/git-help.txt---all"> --all </dt> <dd> <p>Print all the available commands on the standard output.</p> </dd> <dt class="hdlist1" id="Documentation/git-help.txt---no-external-commands"> --no-external-commands </dt> <dd> <p>When used with <code>--all</code>, exclude the listing of external "git-*" commands found in the <code>$PATH</code>.</p> </dd> <dt class="hdlist1" id="Documentation/git-help.txt---no-aliases"> --no-aliases </dt> <dd> <p>When used with <code>--all</code>, exclude the listing of configured aliases.</p> </dd> <dt class="hdlist1" id="Documentation/git-help.txt---verbose"> --verbose </dt> <dd> <p>When used with <code>--all</code>, print description for all recognized commands. This is the default.</p> </dd> <dt class="hdlist1" id="Documentation/git-help.txt--c"> -c </dt> <dt class="hdlist1" id="Documentation/git-help.txt---config"> --config </dt> <dd> <p>List all available configuration variables. This is a short summary of the list in <a href="git-config">git-config[1]</a>.</p> </dd> <dt class="hdlist1" id="Documentation/git-help.txt--g"> -g </dt> <dt class="hdlist1" id="Documentation/git-help.txt---guides"> --guides </dt> <dd> <p>Print a list of the Git concept guides on the standard output.</p> </dd> <dt class="hdlist1" id="Documentation/git-help.txt---user-interfaces"> --user-interfaces </dt> <dd> <p>Print a list of the repository, command and file interfaces documentation on the standard output.</p> <p>In-repository file interfaces such as <code>.git/info/exclude</code> are documented here (see <a href="gitrepository-layout">gitrepository-layout[5]</a>), as well as in-tree configuration such as <code>.mailmap</code> (see <a href="gitmailmap">gitmailmap[5]</a>).</p> <p>This section of the documentation also covers general or widespread user-interface conventions (e.g. <a href="gitcli">gitcli[7]</a>), and pseudo-configuration such as the file-based <code>.git/hooks/*</code> interface described in <a href="githooks">githooks[5]</a>.</p> </dd> <dt class="hdlist1" id="Documentation/git-help.txt---developer-interfaces"> --developer-interfaces </dt> <dd> <p>Print a list of file formats, protocols and other developer interfaces documentation on the standard output.</p> </dd> <dt class="hdlist1" id="Documentation/git-help.txt--i"> -i </dt> <dt class="hdlist1" id="Documentation/git-help.txt---info"> --info </dt> <dd> <p>Display manual page for the command in the <code>info</code> format. The <code>info</code> program will be used for that purpose.</p> </dd> <dt class="hdlist1" id="Documentation/git-help.txt--m"> -m </dt> <dt class="hdlist1" id="Documentation/git-help.txt---man"> --man </dt> <dd> <p>Display manual page for the command in the <code>man</code> format. This option may be used to override a value set in the <code>help.format</code> configuration variable.</p> <p>By default the <code>man</code> program will be used to display the manual page, but the <code>man.viewer</code> configuration variable may be used to choose other display programs (see below).</p> </dd> <dt class="hdlist1" id="Documentation/git-help.txt--w"> -w </dt> <dt class="hdlist1" id="Documentation/git-help.txt---web"> --web </dt> <dd> <p>Display manual page for the command in the <code>web</code> (HTML) format. A web browser will be used for that purpose.</p> <p>The web browser can be specified using the configuration variable <code>help.browser</code>, or <code>web.browser</code> if the former is not set. If neither of these config variables is set, the <code>git web--browse</code> helper script (called by <code>git help</code>) will pick a suitable default. See <a href="git-web--browse">git-web--browse[1]</a> for more information about this.</p> </dd> </dl> </div> </div> <h2 id="_configuration_variables">Configuration variables</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_help_format">
help.format</h3> <p>If no command-line option is passed, the <code>help.format</code> configuration variable will be checked. The following values are supported for this variable; they make <code>git help</code> behave as their corresponding command- line option:</p> <div class="ulist"> <ul> <li> <p>"man" corresponds to <code>-m|--man</code>,</p> </li> <li> <p>"info" corresponds to <code>-i|--info</code>,</p> </li> <li> <p>"web" or "html" correspond to <code>-w|--web</code>.</p> </li> </ul> </div> </div> <div class="sect2"> <h3 id="_help_browser_web_browser_and_browser_tool_path">
help.browser, web.browser, and browser.<tool>.path</h3> <p>The <code>help.browser</code>, <code>web.browser</code> and <code>browser.<tool>.path</code> will also be checked if the <code>web</code> format is chosen (either by command-line option or configuration variable). See <code>-w|--web</code> in the OPTIONS section above and <a href="git-web--browse">git-web--browse[1]</a>.</p> </div> <div class="sect2"> <h3 id="_man_viewer">
man.viewer</h3> <p>The <code>man.viewer</code> configuration variable will be checked if the <code>man</code> format is chosen. The following values are currently supported:</p> <div class="ulist"> <ul> <li> <p>"man": use the <code>man</code> program as usual,</p> </li> <li> <p>"woman": use <code>emacsclient</code> to launch the "woman" mode in emacs (this only works starting with emacsclient versions 22),</p> </li> <li> <p>"konqueror": use <code>kfmclient</code> to open the man page in a new konqueror tab (see <code>Note about konqueror</code> below).</p> </li> </ul> </div> <p>Values for other tools can be used if there is a corresponding <code>man.<tool>.cmd</code> configuration entry (see below).</p> <p>Multiple values may be given to the <code>man.viewer</code> configuration variable. Their corresponding programs will be tried in the order listed in the configuration file.</p> <p>For example, this configuration:</p> <div class="listingblock"> <div class="content"> <pre> [man]
viewer = konqueror
viewer = woman</pre> </div> </div> <p>will try to use konqueror first. But this may fail (for example, if DISPLAY is not set) and in that case emacs' woman mode will be tried.</p> <p>If everything fails, or if no viewer is configured, the viewer specified in the <code>GIT_MAN_VIEWER</code> environment variable will be tried. If that fails too, the <code>man</code> program will be tried anyway.</p> </div> <div class="sect2"> <h3 id="_man_tool_path">
man.<tool>.path</h3> <p>You can explicitly provide a full path to your preferred man viewer by setting the configuration variable <code>man.<tool>.path</code>. For example, you can configure the absolute path to konqueror by setting <code>man.konqueror.path</code>. Otherwise, <code>git help</code> assumes the tool is available in PATH.</p> </div> <div class="sect2"> <h3 id="_man_tool_cmd">
man.<tool>.cmd</h3> <p>When the man viewer, specified by the <code>man.viewer</code> configuration variables, is not among the supported ones, then the corresponding <code>man.<tool>.cmd</code> configuration variable will be looked up. If this variable exists then the specified tool will be treated as a custom command and a shell eval will be used to run the command with the man page passed as arguments.</p> </div> <div class="sect2"> <h3 id="_note_about_konqueror">
Note about konqueror</h3> <p>When <code>konqueror</code> is specified in the <code>man.viewer</code> configuration variable, we launch <code>kfmclient</code> to try to open the man page on an already opened konqueror in a new tab if possible.</p> <p>For consistency, we also try such a trick if <code>man.konqueror.path</code> is set to something like <code>A_PATH_TO/konqueror</code>. That means we will try to launch <code>A_PATH_TO/kfmclient</code> instead.</p> <p>If you really want to use <code>konqueror</code>, then you can use something like the following:</p> <div class="listingblock"> <div class="content"> <pre> [man]
viewer = konq
[man "konq"]
cmd = A_PATH_TO/konqueror</pre> </div> </div> </div> <div class="sect2"> <h3 id="_note_about_git_config_global">
Note about git config --global</h3> <p>Note that all these configuration variables should probably be set using the <code>--global</code> flag, for example like this:</p> <div class="listingblock"> <div class="content"> <pre data-language="shell-session">$ git config --global help.format web
$ git config --global web.browser firefox</pre> </div> </div> <p>as they are probably more user specific than repository specific. See <a href="git-config">git-config[1]</a> for more information about this.</p> </div> </div><div class="_attribution">
<p class="_attribution-p">
© 2012–2024 Scott Chacon and others<br>Licensed under the MIT License.<br>
<a href="https://git-scm.com/docs/git-help" class="_attribution-link">https://git-scm.com/docs/git-help</a>
</p>
</div>
|