gitls-remotegit-ls-remote

How to git ls-remote tags in a specific branch


Before cloning a repository, I want to list all the tags in the master branch to filter and finally retrieve a subset of required commits without transferring any additional data.

Is it possible to use git ls-remote to list all tags in a particular branch?


Solution

  • git ls-remote can list branches, tags or heads (branches+tags); it can list all or filter by name but it cannot filter by commit graph because it cannot access commits in the remote repository.