]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-ls-remote.txt
refs: convert peel_object to struct object_id
[thirdparty/git.git] / Documentation / git-ls-remote.txt
CommitLineData
215a7ad1
JH
1git-ls-remote(1)
2================
972b6fe7
JH
3
4NAME
5----
0dde6899 6git-ls-remote - List references in a remote repository
972b6fe7
JH
7
8
9SYNOPSIS
10--------
0dde6899 11[verse]
40a88529 12'git ls-remote' [--heads] [--tags] [--refs] [--upload-pack=<exec>]
99c08d4e
TG
13 [-q | --quiet] [--exit-code] [--get-url]
14 [--symref] [<repository> [<refs>...]]
972b6fe7
JH
15
16DESCRIPTION
17-----------
0dde6899
JF
18Displays references available in a remote repository along with the associated
19commit IDs.
972b6fe7
JH
20
21
22OPTIONS
23-------
3240240f
SB
24-h::
25--heads::
26-t::
27--tags::
972b6fe7
JH
28 Limit to only refs/heads and refs/tags, respectively.
29 These options are _not_ mutually exclusive; when given
30 both, references stored in refs/heads and refs/tags are
31 displayed.
32
40a88529
TG
33--refs::
34 Do not show peeled tags or pseudorefs like HEAD in the output.
35
54813bdd
TG
36-q::
37--quiet::
38 Do not print remote URL to stderr.
39
3240240f 40--upload-pack=<exec>::
ba020ef5 41 Specify the full path of 'git-upload-pack' on the remote
0dde6899 42 host. This allows listing references from repositories accessed via
23bfbb81 43 SSH and where the SSH daemon does not use the PATH configured by the
f0294272 44 user.
0dde6899 45
a8724773
MS
46--exit-code::
47 Exit with status "2" when no matching refs are found in the remote
48 repository. Usually the command exits with status "0" to indicate
49 it successfully talked with the remote repository, whether it
50 found any matching refs.
51
2303cad2
SN
52--get-url::
53 Expand the URL of the given remote repository taking into account any
54 "url.<base>.insteadOf" config setting (See linkgit:git-config[1]) and
55 exit without talking to the remote.
56
99c08d4e
TG
57--symref::
58 In addition to the object pointed by it, show the underlying
59 ref pointed by it when showing a symbolic ref. Currently,
60 upload-pack only shows the symref HEAD, so it will be the only
61 one shown by ls-remote.
62
972b6fe7 63<repository>::
88e36141
RR
64 The "remote" repository to query. This parameter can be
65 either a URL or the name of a remote (see the GIT URLS and
66 REMOTES sections of linkgit:git-fetch[1]).
972b6fe7
JH
67
68<refs>...::
69 When unspecified, all references, after filtering done
70 with --heads and --tags, are shown. When <refs>... are
71 specified, only references matching the given patterns
72 are displayed.
73
74EXAMPLES
75--------
76
77 $ git ls-remote --tags ./.
78 d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
79 f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
80 7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
81 c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
82 0918385dbd9656cab0d1d81ba7453d49bbc16250 refs/tags/junio-gpg-pub
83 $ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc
84 5fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master
85 c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/pu
f0779aef
RR
86 $ git remote add korg http://www.kernel.org/pub/scm/git/git.git
87 $ git ls-remote --tags korg v\*
972b6fe7
JH
88 d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
89 f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
90 c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
91 7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
92
972b6fe7
JH
93GIT
94---
9e1f0a85 95Part of the linkgit:git[1] suite