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:
How about this?
TAG=$(git describe $(git rev-list --tags --max-count=1))
Technically, won't necessarily get you the latest tag, but the latest commit which is tagged, which may or may not be the thing you're looking for.