1GIT-LS-REMOTE(1)                  Git Manual                  GIT-LS-REMOTE(1)
2
3
4

NAME

6       git-ls-remote - List references in a remote repository
7

SYNOPSIS

9       git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]
10                     [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]
11                     [--symref] [<repository> [<refs>...]]
12
13

DESCRIPTION

15       Displays references available in a remote repository along with the
16       associated commit IDs.
17

OPTIONS

19       -h, --heads, -t, --tags
20           Limit to only refs/heads and refs/tags, respectively. These options
21           are not mutually exclusive; when given both, references stored in
22           refs/heads and refs/tags are displayed.
23
24       --refs
25           Do not show peeled tags or pseudorefs like HEAD in the output.
26
27       -q, --quiet
28           Do not print remote URL to stderr.
29
30       --upload-pack=<exec>
31           Specify the full path of git-upload-pack on the remote host. This
32           allows listing references from repositories accessed via SSH and
33           where the SSH daemon does not use the PATH configured by the user.
34
35       --exit-code
36           Exit with status "2" when no matching refs are found in the remote
37           repository. Usually the command exits with status "0" to indicate
38           it successfully talked with the remote repository, whether it found
39           any matching refs.
40
41       --get-url
42           Expand the URL of the given remote repository taking into account
43           any "url.<base>.insteadOf" config setting (See git-config(1)) and
44           exit without talking to the remote.
45
46       --symref
47           In addition to the object pointed by it, show the underlying ref
48           pointed by it when showing a symbolic ref. Currently, upload-pack
49           only shows the symref HEAD, so it will be the only one shown by
50           ls-remote.
51
52       --sort=<key>
53           Sort based on the key given. Prefix - to sort in descending order
54           of the value. Supports "version:refname" or "v:refname" (tag names
55           are treated as versions). The "version:refname" sort order can also
56           be affected by the "versionsort.suffix" configuration variable. See
57           git-for-each-ref(1) for more sort options, but be aware keys like
58           committerdate that require access to the objects themselves will
59           not work for refs whose objects have not yet been fetched from the
60           remote, and will give a missing object error.
61
62       -o <option>, --server-option=<option>
63           Transmit the given string to the server when communicating using
64           protocol version 2. The given string must not contain a NUL or LF
65           character. When multiple --server-option=<option> are given, they
66           are all sent to the other side in the order listed on the command
67           line.
68
69       <repository>
70           The "remote" repository to query. This parameter can be either a
71           URL or the name of a remote (see the GIT URLS and REMOTES sections
72           of git-fetch(1)).
73
74       <refs>...
75           When unspecified, all references, after filtering done with --heads
76           and --tags, are shown. When <refs>... are specified, only
77           references matching the given patterns are displayed.
78

EXAMPLES

80           $ git ls-remote --tags ./.
81           d6602ec5194c87b0fc87103ca4d67251c76f233a        refs/tags/v0.99
82           f25a265a342aed6041ab0cc484224d9ca54b6f41        refs/tags/v0.99.1
83           7ceca275d047c90c0c7d5afb13ab97efdf51bd6e        refs/tags/v0.99.3
84           c5db5456ae3b0873fc659c19fafdde22313cc441        refs/tags/v0.99.2
85           0918385dbd9656cab0d1d81ba7453d49bbc16250        refs/tags/junio-gpg-pub
86           $ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc
87           5fe978a5381f1fbad26a80e682ddd2a401966740        refs/heads/master
88           c781a84b5204fb294c9ccc79f8b3baceeb32c061        refs/heads/pu
89           $ git remote add korg http://www.kernel.org/pub/scm/git/git.git
90           $ git ls-remote --tags korg v\*
91           d6602ec5194c87b0fc87103ca4d67251c76f233a        refs/tags/v0.99
92           f25a265a342aed6041ab0cc484224d9ca54b6f41        refs/tags/v0.99.1
93           c5db5456ae3b0873fc659c19fafdde22313cc441        refs/tags/v0.99.2
94           7ceca275d047c90c0c7d5afb13ab97efdf51bd6e        refs/tags/v0.99.3
95

SEE ALSO

97       git-check-ref-format(1).
98

GIT

100       Part of the git(1) suite
101
102
103
104Git 2.21.0                        02/24/2019                  GIT-LS-REMOTE(1)
Impressum