blob: 774de5e9d9fc2d4d88e4f820be177ea6c0a09360 [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 Hamanofce7c7e2008-07-02 03:06:3812'git ls-remote' [--heads] [--tags] [-u <exec> | --upload-pack <exec>]
Junio C Hamano2a294cd2011-05-23 23:06:3113 [--exit-code] <repository> [<refs>...]
Junio C Hamano1a4e8412005-12-27 08:17:2314
15DESCRIPTION
16-----------
Junio C Hamano6b2cee12006-08-26 08:43:3117Displays references available in a remote repository along with the associated
18commit IDs.
Junio C Hamano1a4e8412005-12-27 08:17:2319
20
21OPTIONS
22-------
Junio C Hamanoeb415992008-06-08 22:49:4723-h::
24--heads::
25-t::
26--tags::
Junio C Hamano1a4e8412005-12-27 08:17:2327Limit to only refs/heads and refs/tags, respectively.
28These options are _not_ mutually exclusive; when given
29both, references stored in refs/heads and refs/tags are
30displayed.
31
Junio C Hamanoeb415992008-06-08 22:49:4732-u <exec>::
33--upload-pack=<exec>::
Junio C Hamanoba4b9282008-07-06 05:20:3134Specify the full path of 'git-upload-pack' on the remote
Junio C Hamano6b2cee12006-08-26 08:43:3135host. This allows listing references from repositories accessed via
Junio C Hamanof9771f62007-01-17 17:42:3036SSH and where the SSH daemon does not use the PATH configured by the
Junio C Hamano1fbbbc12007-12-18 07:01:2737user.
Junio C Hamano6b2cee12006-08-26 08:43:3138
Junio C Hamano2a294cd2011-05-23 23:06:3139--exit-code::
40Exit with status "2" when no matching refs are found in the remote
41repository. Usually the command exits with status "0" to indicate
42it successfully talked with the remote repository, whether it
43found any matching refs.
44
Junio C Hamanof76c10b2012-09-14 20:11:0445--get-url::
46Expand the URL of the given remote repository taking into account any
47"url.<base>.insteadOf" config setting (See linkgit:git-config[1]) and
48exit without talking to the remote.
49
Junio C Hamano1a4e8412005-12-27 08:17:2350<repository>::
51Location of the repository. The shorthand defined in
Junio C Hamano6b2cee12006-08-26 08:43:3152$GIT_DIR/branches/ can be used. Use "." (dot) to list references in
53the local repository.
Junio C Hamano1a4e8412005-12-27 08:17:2354
55<refs>...::
56When unspecified, all references, after filtering done
57with --heads and --tags, are shown. When <refs>... are
58specified, only references matching the given patterns
59are displayed.
60
61EXAMPLES
62--------
63
64$ git ls-remote --tags ./.
65d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
66f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
677ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
68c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
690918385dbd9656cab0d1d81ba7453d49bbc16250 refs/tags/junio-gpg-pub
70$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc
715fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master
72c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/pu
73b1d096f2926c4e37c9c0b6a7bf2119bedaa277cb refs/heads/rc
74$ echo http://www.kernel.org/pub/scm/git/git.git >.git/branches/public
75$ git ls-remote --tags public v\*
76d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
77f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
78c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
797ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
80
Junio C Hamano1a4e8412005-12-27 08:17:2381GIT
82---
Junio C Hamanof7c042d2008-06-06 22:50:5383Part of the linkgit:git[1] suite