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

209 lines
5.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of GIT-LS-REMOTE</TITLE>
</HEAD><BODY>
<H1>GIT-LS-REMOTE</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-ls-remote - List references in a remote repository
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<PRE>
<I>git ls-remote</I> [--heads] [--tags] [--refs] [--upload-pack=&lt;exec&gt;]
[-q | --quiet] [--exit-code] [--get-url] [--sort=&lt;key&gt;]
[--symref] [&lt;repository&gt; [&lt;refs&gt;...]]
</PRE>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
Displays references available in a remote repository along with the associated commit IDs.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
-h, --heads, -t, --tags
<DL COMPACT><DT id="1"><DD>
Limit to only refs/heads and refs/tags, respectively. These options are
<I>not</I>
mutually exclusive; when given both, references stored in refs/heads and refs/tags are displayed.
</DL>
<P>
--refs
<DL COMPACT><DT id="2"><DD>
Do not show peeled tags or pseudorefs like
<B>HEAD</B>
in the output.
</DL>
<P>
-q, --quiet
<DL COMPACT><DT id="3"><DD>
Do not print remote URL to stderr.
</DL>
<P>
--upload-pack=&lt;exec&gt;
<DL COMPACT><DT id="4"><DD>
Specify the full path of
<I>git-upload-pack</I>
on the remote host. This allows listing references from repositories accessed via SSH and where the SSH daemon does not use the PATH configured by the user.
</DL>
<P>
--exit-code
<DL COMPACT><DT id="5"><DD>
Exit with status &quot;2&quot; when no matching refs are found in the remote repository. Usually the command exits with status &quot;0&quot; to indicate it successfully talked with the remote repository, whether it found any matching refs.
</DL>
<P>
--get-url
<DL COMPACT><DT id="6"><DD>
Expand the URL of the given remote repository taking into account any &quot;url.&lt;base&gt;.insteadOf&quot; config setting (See
<B><A HREF="/cgi-bin/man/man2html?1+git-config">git-config</A></B>(1)) and exit without talking to the remote.
</DL>
<P>
--symref
<DL COMPACT><DT id="7"><DD>
In addition to the object pointed by it, show the underlying ref pointed by it when showing a symbolic ref. Currently, upload-pack only shows the symref HEAD, so it will be the only one shown by ls-remote.
</DL>
<P>
--sort=&lt;key&gt;
<DL COMPACT><DT id="8"><DD>
Sort based on the key given. Prefix
<B>-</B>
to sort in descending order of the value. Supports &quot;version:refname&quot; or &quot;v:refname&quot; (tag names are treated as versions). The &quot;version:refname&quot; sort order can also be affected by the &quot;versionsort.suffix&quot; configuration variable. See
<B><A HREF="/cgi-bin/man/man2html?1+git-for-each-ref">git-for-each-ref</A></B>(1)
for more sort options, but be aware keys like
<B>committerdate</B>
that require access to the objects themselves will not work for refs whose objects have not yet been fetched from the remote, and will give a
<B>missing object</B>
error.
</DL>
<P>
-o &lt;option&gt;, --server-option=&lt;option&gt;
<DL COMPACT><DT id="9"><DD>
Transmit the given string to the server when communicating using protocol version 2. The given string must not contain a NUL or LF character. When multiple
<B>--server-option=&lt;option&gt;</B>
are given, they are all sent to the other side in the order listed on the command line.
</DL>
<P>
&lt;repository&gt;
<DL COMPACT><DT id="10"><DD>
The &quot;remote&quot; repository to query. This parameter can be either a URL or the name of a remote (see the GIT URLS and REMOTES sections of
<B><A HREF="/cgi-bin/man/man2html?1+git-fetch">git-fetch</A></B>(1)).
</DL>
<P>
&lt;refs&gt;...
<DL COMPACT><DT id="11"><DD>
When unspecified, all references, after filtering done with --heads and --tags, are shown. When &lt;refs&gt;... are specified, only references matching the given patterns are displayed.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>EXAMPLES</H2>
<P>
<DL COMPACT><DT id="12"><DD>
<PRE>
$ git ls-remote --tags ./.
d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
0918385dbd9656cab0d1d81ba7453d49bbc16250 refs/tags/junio-gpg-pub
$ git ls-remote <A HREF="http://www.kernel.org/pub/scm/git/git.git">http://www.kernel.org/pub/scm/git/git.git</A> master pu rc
5fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master
c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/pu
$ git remote add korg <A HREF="http://www.kernel.org/pub/scm/git/git.git">http://www.kernel.org/pub/scm/git/git.git</A>
$ git ls-remote --tags korg v\*
d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
</PRE>
</DL>
<P>
<A NAME="lbAG">&nbsp;</A>
<H2>SEE ALSO</H2>
<P>
<B><A HREF="/cgi-bin/man/man2html?1+git-check-ref-format">git-check-ref-format</A></B>(1).
<A NAME="lbAH">&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="13"><A HREF="#lbAB">NAME</A><DD>
<DT id="14"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="15"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="16"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="17"><A HREF="#lbAF">EXAMPLES</A><DD>
<DT id="18"><A HREF="#lbAG">SEE ALSO</A><DD>
<DT id="19"><A HREF="#lbAH">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>