dcb
dcb

Reputation: 2292

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?

Upvotes: 1

Views: 1680

Answers (2)

phd
phd

Reputation: 94418

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.

Upvotes: 2

Romain Valeri
Romain Valeri

Reputation: 21918

git tag --list --merged <branchName>

would do the job on a repo you already have locally. Could it help your case?

I guess not unless you somehow have access to the remote machine itself.

Upvotes: 1

Related Questions