How to List All Git Tags From a Specific Remote?

If you want to list git tags from a specific remote, then you can use the following command:

git ls-remote --tags <remote-name>

For example, to list all tags for the remote called "origin", you would do the following:

git ls-remote --tags origin

This would result in an output similar to the following:

a1b3e4626f2dcd225050999942aa65e3564a4997	refs/tags/v1.0.0
80c6ed6965e38cac149b3ee0a677358406955ef0	refs/tags/v1.5.0

This post was published by Daniyal Hamid. Daniyal currently works as the Head of Engineering in Germany and has 20+ years of experience in software engineering, design and marketing. Please show your love and support by sharing this post.