aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-ls-remote.txt
diff options
context:
space:
mode:
authorSean Allred <allred.sean@gmail.com>2023-05-19 04:17:53 +0000
committerJunio C Hamano <gitster@pobox.com>2023-05-19 08:19:34 -0700
commita5b076321a4fe19fd25a3192304cb88abf9aefbf (patch)
treeac6277254eb52a3bb04472a1677836804ad8dab0 /Documentation/git-ls-remote.txt
parente959fa452f5928502c26569eadf054a43b815dc0 (diff)
downloadgit-a5b076321a4fe19fd25a3192304cb88abf9aefbf.tar.gz
ls-remote doc: explain what each example does
While it's good to have several examples to solidify the output pattern and generally demonstrate how to use the command, most other EXAMPLES sections (e.g., git-show-branch.txt, git-remote.txt) additionally describe the problem/situation to which the example is applicable. Follow this example in the ls-remote documentation. Signed-off-by: Sean Allred <allred.sean@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-ls-remote.txt')
-rw-r--r--Documentation/git-ls-remote.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
index aabc1a7b90..c0b2facef4 100644
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -99,13 +99,18 @@ OPTIONS
EXAMPLES
--------
+* List all references matching given patterns:
++
----
$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master seen rc
5fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master
c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/seen
+----
-$ git remote add korg http://www.kernel.org/pub/scm/git/git.git
-$ git ls-remote --tags korg v\*
+* List only tags matching a given wildcard pattern:
++
+----
+$ git ls-remote --tags http://www.kernel.org/pub/scm/git/git.git v\*
485a869c64a68cc5795dd99689797c5900f4716d refs/tags/v2.39.2
cbf04937d5b9fcf0a76c28f69e6294e9e3ecd7e6 refs/tags/v2.39.2^{}
d4ca2e3147b409459955613c152220f4db848ee1 refs/tags/v2.40.0