blob: 5f2628c8f86a65b0bfe8e29995fa2176927a30f0 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-ls-remote(1)
2================
3
4NAME
5----
Junio C Hamano6b2cee12006-08-26 08:43:316git-ls-remote - List references in a remote repository
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamano6b2cee12006-08-26 08:43:3111[verse]
Junio C Hamanoffe10ca2016-02-04 00:44:2312'git ls-remote' [--heads] [--tags] [--refs] [--upload-pack=<exec>]
13 [-q | --quiet] [--exit-code] [--get-url]
14 [--symref] [<repository> [<refs>...]]
Junio C Hamano1a4e8412005-12-27 08:17:2315
16DESCRIPTION
17-----------
Junio C Hamano6b2cee12006-08-26 08:43:3118Displays references available in a remote repository along with the associated
19commit IDs.
Junio C Hamano1a4e8412005-12-27 08:17:2320
21
22OPTIONS
23-------
Junio C Hamanoeb415992008-06-08 22:49:4724-h::
25--heads::
26-t::
27--tags::
Junio C Hamano1a4e8412005-12-27 08:17:2328Limit to only refs/heads and refs/tags, respectively.
29These options are _not_ mutually exclusive; when given
30both, references stored in refs/heads and refs/tags are
31displayed.
32
Junio C Hamanoffe10ca2016-02-04 00:44:2333--refs::
34Do not show peeled tags or pseudorefs like HEAD in the output.
35
36-q::
37--quiet::
38Do not print remote URL to stderr.
39
Junio C Hamanoeb415992008-06-08 22:49:4740--upload-pack=<exec>::
Junio C Hamanoba4b9282008-07-06 05:20:3141Specify the full path of 'git-upload-pack' on the remote
Junio C Hamano6b2cee12006-08-26 08:43:3142host. This allows listing references from repositories accessed via
Junio C Hamanof9771f62007-01-17 17:42:3043SSH and where the SSH daemon does not use the PATH configured by the
Junio C Hamano1fbbbc12007-12-18 07:01:2744user.
Junio C Hamano6b2cee12006-08-26 08:43:3145
Junio C Hamano2a294cd2011-05-23 23:06:3146--exit-code::
47Exit with status "2" when no matching refs are found in the remote
48repository. Usually the command exits with status "0" to indicate
49it successfully talked with the remote repository, whether it
50found any matching refs.
51
Junio C Hamanof76c10b2012-09-14 20:11:0452--get-url::
53Expand the URL of the given remote repository taking into account any
54"url.<base>.insteadOf" config setting (See linkgit:git-config[1]) and
55exit without talking to the remote.
56
Junio C Hamanoffe10ca2016-02-04 00:44:2357--symref::
58In addition to the object pointed by it, show the underlying
59ref pointed by it when showing a symbolic ref. Currently,
60upload-pack only shows the symref HEAD, so it will be the only
61one shown by ls-remote.
62
Junio C Hamano1a4e8412005-12-27 08:17:2363<repository>::
Junio C Hamanoa1952302013-07-01 21:31:1864The "remote" repository to query. This parameter can be
65either a URL or the name of a remote (see the GIT URLS and
66REMOTES sections of linkgit:git-fetch[1]).
Junio C Hamano1a4e8412005-12-27 08:17:2367
68<refs>...::
69When unspecified, all references, after filtering done
70with --heads and --tags, are shown. When <refs>... are
71specified, only references matching the given patterns
72are displayed.
73
74EXAMPLES
75--------
76
77$ git ls-remote --tags ./.
78d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
79f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
807ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
81c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
820918385dbd9656cab0d1d81ba7453d49bbc16250 refs/tags/junio-gpg-pub
83$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc
845fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master
85c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/pu
Junio C Hamanoa1952302013-07-01 21:31:1886$ git remote add korg http://www.kernel.org/pub/scm/git/git.git
87$ git ls-remote --tags korg v\*
Junio C Hamano1a4e8412005-12-27 08:17:2388d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
89f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
90c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
917ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
92
Junio C Hamano1a4e8412005-12-27 08:17:2393GIT
94---
Junio C Hamanof7c042d2008-06-06 22:50:5395Part of the linkgit:git[1] suite