man-pages/man1/git-help.1.html
2021-03-31 01:06:50 +01:00

341 lines
9.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of GIT-HELP</TITLE>
</HEAD><BODY>
<H1>GIT-HELP</H1>
Section: Git Manual (1)<BR>Updated: 03/04/2021<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
git-help - Display help information about Git
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<PRE>
<I>git help</I> [-a|--all [--[no-]verbose]] [-g|--guide]
[-i|--info|-m|--man|-w|--web] [COMMAND|GUIDE]
</PRE>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
With no options and no COMMAND or GUIDE given, the synopsis of the <I>git</I> command and a list of the most commonly used Git commands are printed on the standard output.
<P>
If the option <B>--all</B> or <B>-a</B> is given, all available commands are printed on the standard output.
<P>
If the option <B>--guide</B> or <B>-g</B> is given, a list of the useful Git guides is also printed on the standard output.
<P>
If a command, or a guide, is given, a manual page for that command or guide is brought up. The <I>man</I> program is used by default for this purpose, but this can be overridden by other options or configuration variables.
<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 <B>git COMMAND --help</B>.
<P>
Note that <B>git --help ...</B> is identical to <B>git help ...</B> because the former is internally converted into the latter.
<P>
To display the <B><A HREF="/cgi-bin/man/man2html?1+git">git</A></B>(1) man page, use <B>git help git</B>.
<P>
This page can be displayed with <I>git help help</I> or <B>git help --help</B>
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
-a, --all
<DL COMPACT><DT id="1"><DD>
Prints all the available commands on the standard output. This option overrides any given command or guide name.
</DL>
<P>
--verbose
<DL COMPACT><DT id="2"><DD>
When used with
<B>--all</B>
print description for all recognized commands. This is the default.
</DL>
<P>
-c, --config
<DL COMPACT><DT id="3"><DD>
List all available configuration variables. This is a short summary of the list in
<B><A HREF="/cgi-bin/man/man2html?1+git-config">git-config</A></B>(1).
</DL>
<P>
-g, --guides
<DL COMPACT><DT id="4"><DD>
Prints a list of useful guides on the standard output. This option overrides any given command or guide name.
</DL>
<P>
-i, --info
<DL COMPACT><DT id="5"><DD>
Display manual page for the command in the
<I>info</I>
format. The
<I>info</I>
program will be used for that purpose.
</DL>
<P>
-m, --man
<DL COMPACT><DT id="6"><DD>
Display manual page for the command in the
<I>man</I>
format. This option may be used to override a value set in the
<B>help.format</B>
configuration variable.
<P>
By default the
<I>man</I>
program will be used to display the manual page, but the
<B>man.viewer</B>
configuration variable may be used to choose other display programs (see below).
</DL>
<P>
-w, --web
<DL COMPACT><DT id="7"><DD>
Display manual page for the command in the
<I>web</I>
(HTML) format. A web browser will be used for that purpose.
<P>
The web browser can be specified using the configuration variable
<B>help.browser</B>, or
<B>web.browser</B>
if the former is not set. If none of these config variables is set, the
<I>git web--browse</I>
helper script (called by
<I>git help</I>) will pick a suitable default. See
<B><A HREF="/cgi-bin/man/man2html?1+git-web--browse">git-web--browse</A></B>(1)
for more information about this.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>CONFIGURATION VARIABLES</H2>
<A NAME="lbAG">&nbsp;</A>
<H3>help.format</H3>
<P>
If no command-line option is passed, the <B>help.format</B> configuration variable will be checked. The following values are supported for this variable; they make <I>git help</I> behave as their corresponding command- line option:
<P>
<DL COMPACT><DT id="8"><DD>
&bull;
&quot;man&quot; corresponds to
<I>-m|--man</I>,
</DL>
<P>
<DL COMPACT><DT id="9"><DD>
&bull;
&quot;info&quot; corresponds to
<I>-i|--info</I>,
</DL>
<P>
<DL COMPACT><DT id="10"><DD>
&bull;
&quot;web&quot; or &quot;html&quot; correspond to
<I>-w|--web</I>.
</DL>
<A NAME="lbAH">&nbsp;</A>
<H3>help.browser, web.browser and browser.&lt;tool&gt;.path</H3>
<P>
The <B>help.browser</B>, <B>web.browser</B> and <B>browser.&lt;tool&gt;.path</B> will also be checked if the <I>web</I> format is chosen (either by command-line option or configuration variable). See <I>-w|--web</I> in the OPTIONS section above and <B><A HREF="/cgi-bin/man/man2html?1+git-web--browse">git-web--browse</A></B>(1).
<A NAME="lbAI">&nbsp;</A>
<H3>man.viewer</H3>
<P>
The <B>man.viewer</B> configuration variable will be checked if the <I>man</I> format is chosen. The following values are currently supported:
<P>
<DL COMPACT><DT id="11"><DD>
&bull;
&quot;man&quot;: use the
<I>man</I>
program as usual,
</DL>
<P>
<DL COMPACT><DT id="12"><DD>
&bull;
&quot;woman&quot;: use
<I>emacsclient</I>
to launch the &quot;woman&quot; mode in emacs (this only works starting with emacsclient versions 22),
</DL>
<P>
<DL COMPACT><DT id="13"><DD>
&bull;
&quot;konqueror&quot;: use
<I>kfmclient</I>
to open the man page in a new konqueror tab (see
<I>Note about konqueror</I>
below).
</DL>
<P>
Values for other tools can be used if there is a corresponding <B>man.&lt;tool&gt;.cmd</B> configuration entry (see below).
<P>
Multiple values may be given to the <B>man.viewer</B> configuration variable. Their corresponding programs will be tried in the order listed in the configuration file.
<P>
For example, this configuration:
<P>
<DL COMPACT><DT id="14"><DD>
<PRE>
[man]
viewer = konqueror
viewer = woman
</PRE>
</DL>
<P>
<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>
If everything fails, or if no viewer is configured, the viewer specified in the <B>GIT_MAN_VIEWER</B> environment variable will be tried. If that fails too, the <I>man</I> program will be tried anyway.
<A NAME="lbAJ">&nbsp;</A>
<H3>man.&lt;tool&gt;.path</H3>
<P>
You can explicitly provide a full path to your preferred man viewer by setting the configuration variable <B>man.&lt;tool&gt;.path</B>. For example, you can configure the absolute path to konqueror by setting <I>man.konqueror.path</I>. Otherwise, <I>git help</I> assumes the tool is available in PATH.
<A NAME="lbAK">&nbsp;</A>
<H3>man.&lt;tool&gt;.cmd</H3>
<P>
When the man viewer, specified by the <B>man.viewer</B> configuration variables, is not among the supported ones, then the corresponding <B>man.&lt;tool&gt;.cmd</B> 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.
<A NAME="lbAL">&nbsp;</A>
<H3>Note about konqueror</H3>
<P>
When <I>konqueror</I> is specified in the <B>man.viewer</B> configuration variable, we launch <I>kfmclient</I> to try to open the man page on an already opened konqueror in a new tab if possible.
<P>
For consistency, we also try such a trick if <I>man.konqueror.path</I> is set to something like <B>A_PATH_TO/konqueror</B>. That means we will try to launch <B>A_PATH_TO/kfmclient</B> instead.
<P>
If you really want to use <I>konqueror</I>, then you can use something like the following:
<P>
<DL COMPACT><DT id="15"><DD>
<PRE>
[man]
viewer = konq
[man &quot;konq&quot;]
cmd = A_PATH_TO/konqueror
</PRE>
</DL>
<P>
<A NAME="lbAM">&nbsp;</A>
<H3>Note about git config --global</H3>
<P>
Note that all these configuration variables should probably be set using the <B>--global</B> flag, for example like this:
<P>
<DL COMPACT><DT id="16"><DD>
<PRE>
$ git config --global help.format web
$ git config --global web.browser firefox
</PRE>
</DL>
<P>
<P>
as they are probably more user specific than repository specific. See <B><A HREF="/cgi-bin/man/man2html?1+git-config">git-config</A></B>(1) for more information about this.
<A NAME="lbAN">&nbsp;</A>
<H2>GIT</H2>
<P>
Part of the <B><A HREF="/cgi-bin/man/man2html?1+git">git</A></B>(1) suite
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="17"><A HREF="#lbAB">NAME</A><DD>
<DT id="18"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="19"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="20"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="21"><A HREF="#lbAF">CONFIGURATION VARIABLES</A><DD>
<DL>
<DT id="22"><A HREF="#lbAG">help.format</A><DD>
<DT id="23"><A HREF="#lbAH">help.browser, web.browser and browser.&lt;tool&gt;.path</A><DD>
<DT id="24"><A HREF="#lbAI">man.viewer</A><DD>
<DT id="25"><A HREF="#lbAJ">man.&lt;tool&gt;.path</A><DD>
<DT id="26"><A HREF="#lbAK">man.&lt;tool&gt;.cmd</A><DD>
<DT id="27"><A HREF="#lbAL">Note about konqueror</A><DD>
<DT id="28"><A HREF="#lbAM">Note about git config --global</A><DD>
</DL>
<DT id="29"><A HREF="#lbAN">GIT</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:14 GMT, March 31, 2021
</BODY>
</HTML>