<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<article lang="en" id="git-help(1)">
<articleinfo>
    <title>git-help(1)</title>
        <indexterm>
                <primary>git-help(1)</primary>
        </indexterm>
</articleinfo>
<simplesect id="_name">
<title>NAME</title>
<simpara>git-help - display help information about git</simpara>
</simplesect>
<simplesect id="_synopsis">
<title>SYNOPSIS</title>
<simpara><emphasis>git help</emphasis> [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND]</simpara>
</simplesect>
<simplesect id="_description">
<title>DESCRIPTION</title>
<simpara>With no options and no COMMAND given, the synopsis of the <emphasis>git</emphasis>
command and a list of the most commonly used git commands are printed
on the standard output.</simpara>
<simpara>If the option <emphasis>--all</emphasis> or <emphasis>-a</emphasis> is given, then all available commands are
printed on the standard output.</simpara>
<simpara>If a git command is named, a manual page for that command is brought
up. The <emphasis>man</emphasis> program is used by default for this purpose, but this
can be overridden by other options or configuration variables.</simpara>
<simpara>Note that <literal>git --help &#8230;</literal> is identical to <literal>git help &#8230;</literal> because the
former is internally converted into the latter.</simpara>
</simplesect>
<simplesect id="_options">
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>
-a
</term>
<term>
--all
</term>
<listitem>
<simpara>
        Prints all the available commands on the standard output. This
        option supersedes any other option.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-i
</term>
<term>
--info
</term>
<listitem>
<simpara>
        Display manual page for the command in the <emphasis>info</emphasis> format. The
        <emphasis>info</emphasis> program will be used for that purpose.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-m
</term>
<term>
--man
</term>
<listitem>
<simpara>
        Display manual page for the command in the <emphasis>man</emphasis> format. This
        option may be used to override a value set in the
        <emphasis>help.format</emphasis> configuration variable.
</simpara>
<simpara>By default the <emphasis>man</emphasis> program will be used to display the manual page,
but the <emphasis>man.viewer</emphasis> configuration variable may be used to choose
other display programs (see below).</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-w
</term>
<term>
--web
</term>
<listitem>
<simpara>
        Display manual page for the command in the <emphasis>web</emphasis> (HTML)
        format. A web browser will be used for that purpose.
</simpara>
<simpara>The web browser can be specified using the configuration variable
<emphasis>help.browser</emphasis>, or <emphasis>web.browser</emphasis> if the former is not set. If none of
these config variables is set, the <emphasis>git-web&#8212;browse</emphasis> helper script
(called by <emphasis>git-help</emphasis>) will pick a suitable default. See
<xref linkend="git-web&#8212;browse(1)"/> for more information about this.</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="_configuration_variables">
<title>CONFIGURATION VARIABLES</title>
<simplesect id="_help_format">
<title>help.format</title>
<simpara>If no command line option is passed, the <emphasis>help.format</emphasis> configuration
variable will be checked. The following values are supported for this
variable; they make <emphasis>git-help</emphasis> behave as their corresponding command
line option:</simpara>
<itemizedlist>
<listitem>
<simpara>
"man" corresponds to <emphasis>-m|--man</emphasis>,
</simpara>
</listitem>
<listitem>
<simpara>
"info" corresponds to <emphasis>-i|--info</emphasis>,
</simpara>
</listitem>
<listitem>
<simpara>
"web" or "html" correspond to <emphasis>-w|--web</emphasis>.
</simpara>
</listitem>
</itemizedlist>
</simplesect>
<simplesect id="_help_browser_web_browser_and_browser_lt_tool_gt_path">
<title>help.browser, web.browser and browser.&lt;tool&gt;.path</title>
<simpara>The <emphasis>help.browser</emphasis>, <emphasis>web.browser</emphasis> and <emphasis>browser.&lt;tool&gt;.path</emphasis> will also
be checked if the <emphasis>web</emphasis> format is chosen (either by command line
option or configuration variable). See <emphasis>-w|--web</emphasis> in the OPTIONS
section above and <xref linkend="git-web&#8212;browse(1)"/>.</simpara>
</simplesect>
<simplesect id="_man_viewer">
<title>man.viewer</title>
<simpara>The <emphasis>man.viewer</emphasis> config variable will be checked if the <emphasis>man</emphasis> format
is chosen. The following values are currently supported:</simpara>
<itemizedlist>
<listitem>
<simpara>
"man": use the <emphasis>man</emphasis> program as usual,
</simpara>
</listitem>
<listitem>
<simpara>
"woman": use <emphasis>emacsclient</emphasis> to launch the "woman" mode in emacs
(this only works starting with emacsclient versions 22),
</simpara>
</listitem>
<listitem>
<simpara>
"konqueror": use <emphasis>kfmclient</emphasis> to open the man page in a new konqueror
tab (see <emphasis>Note about konqueror</emphasis> below).
</simpara>
</listitem>
</itemizedlist>
<simpara>Values for other tools can be used if there is a corresponding
<emphasis>man.&lt;tool&gt;.cmd</emphasis> configuration entry (see below).</simpara>
<simpara>Multiple values may be given to the <emphasis>man.viewer</emphasis> configuration
variable. Their corresponding programs will be tried in the order
listed in the configuration file.</simpara>
<simpara>For example, this configuration:</simpara>
<literallayout>        [man]
                viewer = konqueror
                viewer = woman</literallayout>
<simpara>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.</simpara>
<simpara>If everything fails, or if no viewer is configured, the viewer specified
in the GIT_MAN_VIEWER environment variable will be tried.  If that
fails too, the <emphasis>man</emphasis> program will be tried anyway.</simpara>
</simplesect>
<simplesect id="_man_lt_tool_gt_path">
<title>man.&lt;tool&gt;.path</title>
<simpara>You can explicitly provide a full path to your preferred man viewer by
setting the configuration variable <emphasis>man.&lt;tool&gt;.path</emphasis>. For example, you
can configure the absolute path to konqueror by setting
<emphasis>man.konqueror.path</emphasis>. Otherwise, <emphasis>git-help</emphasis> assumes the tool is
available in PATH.</simpara>
</simplesect>
<simplesect id="_man_lt_tool_gt_cmd">
<title>man.&lt;tool&gt;.cmd</title>
<simpara>When the man viewer, specified by the <emphasis>man.viewer</emphasis> configuration
variables, is not among the supported ones, then the corresponding
<emphasis>man.&lt;tool&gt;.cmd</emphasis> 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.</simpara>
</simplesect>
<simplesect id="_note_about_konqueror">
<title>Note about konqueror</title>
<simpara>When <emphasis>konqueror</emphasis> is specified in the <emphasis>man.viewer</emphasis> configuration
variable, we launch <emphasis>kfmclient</emphasis> to try to open the man page on an
already opened konqueror in a new tab if possible.</simpara>
<simpara>For consistency, we also try such a trick if <emphasis>man.konqueror.path</emphasis> is
set to something like <emphasis>A_PATH_TO/konqueror</emphasis>. That means we will try to
launch <emphasis>A_PATH_TO/kfmclient</emphasis> instead.</simpara>
<simpara>If you really want to use <emphasis>konqueror</emphasis>, then you can use something like
the following:</simpara>
<literallayout>        [man]
                viewer = konq

        [man "konq"]
                cmd = A_PATH_TO/konqueror</literallayout>
</simplesect>
<simplesect id="_note_about_git_config_global">
<title>Note about git config --global</title>
<simpara>Note that all these configuration variables should probably be set
using the <emphasis>--global</emphasis> flag, for example like this:</simpara>
<literallayout>$ git config --global help.format web
$ git config --global web.browser firefox</literallayout>
<simpara>as they are probably more user specific than repository specific.
See <xref linkend="git-config(1)"/> for more information about this.</simpara>
</simplesect>
</simplesect>
<simplesect id="_author">
<title>Author</title>
<simpara>Written by Junio C Hamano &lt;<ulink url="mailto:gitster@pobox.com">gitster@pobox.com</ulink>&gt; and the git-list
&lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>
</simplesect>
<simplesect id="_documentation">
<title>Documentation</title>
<simpara>Initial documentation was part of the <xref linkend="git(1)"/> man page.
Christian Couder &lt;<ulink url="mailto:chriscool@tuxfamily.org">chriscool@tuxfamily.org</ulink>&gt; extracted and rewrote it a
little. Maintenance is done by the git-list &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>
</simplesect>
<simplesect id="_git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
</simplesect>
</article>
