How to get the latest tag name in current branch in Git?

前端 未结 24 2180
你的背包
你的背包 2020-11-22 17:04

What\'s the simplest way to get the most recent tag in Git?

git tag a HEAD
git tag b HEAD^^
git tag c HEAD^
git tag

output:



        
24条回答
  •  感情败类
    2020-11-22 17:30

    Will output the tag of the latest tagged commit across all branches

    git describe --tags $(git rev-list --tags --max-count=1)
    

提交回复
热议问题