Merge branch 'ps/gitweb-js-with-lineno'
[git/git.git] / Documentation / git-ls-remote.txt
1 git-ls-remote(1)
2 ================
3
4 NAME
5 ----
6 git-ls-remote - List references in a remote repository
7
8
9 SYNOPSIS
10 --------
11 [verse]
12 'git ls-remote' [--heads] [--tags] [-u <exec> | --upload-pack <exec>]
13 [--exit-code] <repository> [<refs>...]
14
15 DESCRIPTION
16 -----------
17 Displays references available in a remote repository along with the associated
18 commit IDs.
19
20
21 OPTIONS
22 -------
23 -h::
24 --heads::
25 -t::
26 --tags::
27 Limit to only refs/heads and refs/tags, respectively.
28 These options are _not_ mutually exclusive; when given
29 both, references stored in refs/heads and refs/tags are
30 displayed.
31
32 -u <exec>::
33 --upload-pack=<exec>::
34 Specify the full path of 'git-upload-pack' on the remote
35 host. This allows listing references from repositories accessed via
36 SSH and where the SSH daemon does not use the PATH configured by the
37 user.
38
39 --exit-code::
40 Exit with status "2" when no matching refs are found in the remote
41 repository. Usually the command exits with status "0" to indicate
42 it successfully talked with the remote repository, whether it
43 found any matching refs.
44
45 <repository>::
46 Location of the repository. The shorthand defined in
47 $GIT_DIR/branches/ can be used. Use "." (dot) to list references in
48 the local repository.
49
50 <refs>...::
51 When unspecified, all references, after filtering done
52 with --heads and --tags, are shown. When <refs>... are
53 specified, only references matching the given patterns
54 are displayed.
55
56 EXAMPLES
57 --------
58
59 $ git ls-remote --tags ./.
60 d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
61 f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
62 7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
63 c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
64 0918385dbd9656cab0d1d81ba7453d49bbc16250 refs/tags/junio-gpg-pub
65 $ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc
66 5fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master
67 c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/pu
68 b1d096f2926c4e37c9c0b6a7bf2119bedaa277cb refs/heads/rc
69 $ echo http://www.kernel.org/pub/scm/git/git.git >.git/branches/public
70 $ git ls-remote --tags public v\*
71 d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
72 f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
73 c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
74 7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
75
76 GIT
77 ---
78 Part of the linkgit:git[1] suite