culebrón culebrón - 1 year ago 84
Git Question

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

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:

a
b
c


Should I write a script to get each tag's datetime and compare them?

JB. JB.
Answer Source

You could take a look at git describe, which does something close to what you're asking.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download