@@ -11,7 +11,7 @@ SYNOPSIS
1111[verse]
1212'git ls-remote' [--heads] [--tags] [--refs] [--upload-pack=<exec>]
1313 [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]
14- [--symref] [<repository> [<refs >...]]
14+ [--symref] [<repository> [<patterns >...]]
1515
1616DESCRIPTION
1717-----------
@@ -85,25 +85,32 @@ OPTIONS
8585 either a URL or the name of a remote (see the GIT URLS and
8686 REMOTES sections of linkgit:git-fetch[1]).
8787
88- <refs >...::
88+ <patterns >...::
8989 When unspecified, all references, after filtering done
90- with --heads and --tags, are shown. When <refs>... are
91- specified, only references matching the given patterns
92- are displayed.
90+ with --heads and --tags, are shown. When <patterns>... are
91+ specified, only references matching one or more of the given
92+ patterns are displayed. Each pattern is interpreted as a glob
93+ (see `glob` in linkgit:gitglossary[7]) which is matched against
94+ the "tail" of a ref, starting either from the start of the ref
95+ (so a full name like `refs/heads/foo` matches) or from a slash
96+ separator (so `bar` matches `refs/heads/bar` but not
97+ `refs/heads/foobar`).
9398
9499EXAMPLES
95100--------
96101
97102----
98- $ git ls-remote --tags ./.
103+ $ git ls-remote --tags .
99104d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
100105f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
1011067ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
102107c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
1031080918385dbd9656cab0d1d81ba7453d49bbc16250 refs/tags/junio-gpg-pub
109+
104110$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master seen rc
1051115fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master
106112c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/seen
113+
107114$ git remote add korg http://www.kernel.org/pub/scm/git/git.git
108115$ git ls-remote --tags korg v\*
109116d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
0 commit comments