Documentation / git-ls-remote.txton commit Merge branch 'gr/rebase-i-drop-warn' (633a8bd)
   1git-ls-remote(1)
   2================
   3
   4NAME
   5----
   6git-ls-remote - List references in a remote repository
   7
   8
   9SYNOPSIS
  10--------
  11[verse]
  12'git ls-remote' [--heads] [--tags]  [--upload-pack=<exec>]
  13              [--exit-code] <repository> [<refs>...]
  14
  15DESCRIPTION
  16-----------
  17Displays references available in a remote repository along with the associated
  18commit IDs.
  19
  20
  21OPTIONS
  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--upload-pack=<exec>::
  33        Specify the full path of 'git-upload-pack' on the remote
  34        host. This allows listing references from repositories accessed via
  35        SSH and where the SSH daemon does not use the PATH configured by the
  36        user.
  37
  38--exit-code::
  39        Exit with status "2" when no matching refs are found in the remote
  40        repository. Usually the command exits with status "0" to indicate
  41        it successfully talked with the remote repository, whether it
  42        found any matching refs.
  43
  44--get-url::
  45        Expand the URL of the given remote repository taking into account any
  46        "url.<base>.insteadOf" config setting (See linkgit:git-config[1]) and
  47        exit without talking to the remote.
  48
  49<repository>::
  50        The "remote" repository to query.  This parameter can be
  51        either a URL or the name of a remote (see the GIT URLS and
  52        REMOTES sections of linkgit:git-fetch[1]).
  53
  54<refs>...::
  55        When unspecified, all references, after filtering done
  56        with --heads and --tags, are shown.  When <refs>... are
  57        specified, only references matching the given patterns
  58        are displayed.
  59
  60EXAMPLES
  61--------
  62
  63        $ git ls-remote --tags ./.
  64        d6602ec5194c87b0fc87103ca4d67251c76f233a        refs/tags/v0.99
  65        f25a265a342aed6041ab0cc484224d9ca54b6f41        refs/tags/v0.99.1
  66        7ceca275d047c90c0c7d5afb13ab97efdf51bd6e        refs/tags/v0.99.3
  67        c5db5456ae3b0873fc659c19fafdde22313cc441        refs/tags/v0.99.2
  68        0918385dbd9656cab0d1d81ba7453d49bbc16250        refs/tags/junio-gpg-pub
  69        $ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc
  70        5fe978a5381f1fbad26a80e682ddd2a401966740        refs/heads/master
  71        c781a84b5204fb294c9ccc79f8b3baceeb32c061        refs/heads/pu
  72        $ git remote add korg http://www.kernel.org/pub/scm/git/git.git
  73        $ git ls-remote --tags korg v\*
  74        d6602ec5194c87b0fc87103ca4d67251c76f233a        refs/tags/v0.99
  75        f25a265a342aed6041ab0cc484224d9ca54b6f41        refs/tags/v0.99.1
  76        c5db5456ae3b0873fc659c19fafdde22313cc441        refs/tags/v0.99.2
  77        7ceca275d047c90c0c7d5afb13ab97efdf51bd6e        refs/tags/v0.99.3
  78
  79GIT
  80---
  81Part of the linkgit:git[1] suite