Get last git tag from a remote repo without cloning
问题 How to get last tag from a (non checked-out) remote repo? On my local copy I use describe git describe --abbrev=0 --tags But I cannot use describe with remote storage 回答1: Use git ls-remote --tags <repository> For example, if we want to know what the latest tag that Git is at we would do git ls-remote --tags git://github.com/git/git.git That returns a long list with all the tags in alphabetical order, as shown below (truncated for sanity's sake). The last line tells us the latest tag is v1.8