<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">

<sect2 lang="en" id="git-help(1)">
    <title>git-help(1)</title>
    <date>2024-07-02</date>
<revhistory><revision><date>2024-07-02</date></revision></revhistory>
<indexterm>
<primary>git-help(1)</primary>
</indexterm>
<simplesect id="git-help(1)__name">
<title>NAME</title>
<simpara>git-help - Display help information about Git</simpara>
</simplesect>
<simplesect id="git-help(1)__synopsis">
<title>SYNOPSIS</title>
<blockquote>
<literallayout><emphasis>git help</emphasis> [-a|--all] [--[no-]verbose] [--[no-]external-commands] [--[no-]aliases]
<emphasis>git help</emphasis> [[-i|--info] [-m|--man] [-w|--web]] [&lt;command&gt;|&lt;doc&gt;]
<emphasis>git help</emphasis> [-g|--guides]
<emphasis>git help</emphasis> [-c|--config]
<emphasis>git help</emphasis> [--user-interfaces]
<emphasis>git help</emphasis> [--developer-interfaces]</literallayout>
</blockquote>
</simplesect>
<simplesect id="git-help(1)__description">
<title>DESCRIPTION</title>
<simpara>With no options and no <emphasis>&lt;command&gt;</emphasis> or <emphasis>&lt;doc&gt;</emphasis> 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, all available commands are
printed on the standard output.</simpara>
<simpara>If the option <emphasis>--guides</emphasis> or <emphasis>-g</emphasis> is given, a list of the
Git concept guides is also printed on the standard output.</simpara>
<simpara>If a command or other documentation is given, the relevant manual page
will be 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>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
<emphasis>git &lt;command&gt; --help</emphasis>.</simpara>
<simpara>Note that <emphasis>git --help ...</emphasis> is identical to <emphasis>git help ...</emphasis> because the
former is internally converted into the latter.</simpara>
<simpara>To display the <xref linkend="git(1)" /> man page, use <emphasis>git help git</emphasis>.</simpara>
<simpara>This page can be displayed with <emphasis>git help help</emphasis> or <emphasis>git help --help</emphasis>.</simpara>
</simplesect>
<simplesect id="git-help(1)__options">
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>
-a
</term>
<term>
--all
</term>
<listitem>
<simpara>
        Print all the available commands on the standard output.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--no-external-commands
</term>
<listitem>
<simpara>
        When used with <emphasis>--all</emphasis>, exclude the listing of external "git-*"
        commands found in the <emphasis>$PATH</emphasis>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--no-aliases
</term>
<listitem>
<simpara>
        When used with <emphasis>--all</emphasis>, exclude the listing of configured
        aliases.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--verbose
</term>
<listitem>
<simpara>
        When used with <emphasis>--all</emphasis>, print description for all recognized
        commands. This is the default.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-c
</term>
<term>
--config
</term>
<listitem>
<simpara>
        List all available configuration variables. This is a short
        summary of the list in <xref linkend="git-config(1)" />.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-g
</term>
<term>
--guides
</term>
<listitem>
<simpara>
        Print a list of the Git concept guides on the standard output.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--user-interfaces
</term>
<listitem>
<simpara>
        Print a list of the repository, command and file interfaces
        documentation on the standard output.
</simpara>
<simpara>In-repository file interfaces such as <emphasis>.git/info/exclude</emphasis> are
documented here (see <xref linkend="gitrepository-layout(5)" />), as well as
in-tree configuration such as <emphasis>.mailmap</emphasis> (see <xref linkend="gitmailmap(5)" />).</simpara>
<simpara>This section of the documentation also covers general or widespread
user-interface conventions (e.g. <xref linkend="gitcli(7)" />), and
pseudo-configuration such as the file-based <emphasis>.git/hooks/*</emphasis> interface
described in <xref linkend="githooks(5)" />.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--developer-interfaces
</term>
<listitem>
<simpara>
        Print a list of file formats, protocols and other developer
        interfaces documentation on the standard output.
</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 neither of
these config variables is set, the <emphasis>git web&#45;&#45;browse</emphasis> helper script
(called by <emphasis>git help</emphasis>) will pick a suitable default. See
<xref linkend="git-web&#45;&#45;browse(1)" /> for more information about this.</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="git-help(1)__configuration_variables">
<title>CONFIGURATION VARIABLES</title>
<section id="git-help(1)__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>
</section>
<section id="git-help(1)__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&#45;&#45;browse(1)" />.</simpara>
</section>
<section id="git-help(1)__man_viewer">
<title>man.viewer</title>
<simpara>The <emphasis>man.viewer</emphasis> configuration 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>
<screen>        [man]
                viewer = konqueror
                viewer = woman</screen>
<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 <emphasis>GIT_MAN_VIEWER</emphasis> environment variable will be tried.  If that
fails too, the <emphasis>man</emphasis> program will be tried anyway.</simpara>
</section>
<section id="git-help(1)__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>
</section>
<section id="git-help(1)__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>
</section>
<section id="git-help(1)__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>
<screen>        [man]
                viewer = konq

        [man "konq"]
                cmd = A_PATH_TO/konqueror</screen>
</section>
<section id="git-help(1)__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>
<screen>$ git config --global help.format web
$ git config --global web.browser firefox</screen>
<simpara>as they are probably more user specific than repository specific.
See <xref linkend="git-config(1)" /> for more information about this.</simpara>
</section>
</simplesect>
<simplesect id="git-help(1)__git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
</simplesect>
</sect2>
