Show only tags references in the default remote repository

git ls-remote

  • Git command for listing references in a remote repository based on name or URL.
    If no name or URL are given, then the configured upstream branch will be used, or remote origin if the former is not configured.
    More information: <https://git-scm.com/docs/git-ls-remote>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

git ls-remote --tags

click the source code to copy install git ls-remote on any operating system with command-not-found.com