Reputation: 17352
I need to get the hash of the latest tag commit on the current branch.
If I do
git show-ref --tag
I do get all tags and their commit ids, but I just need the latest one and only the hash itself.
Doing
git describe --tags --abbrev=0
Only gives me the latest tag, but no hash...
So I did
git tag --list --format '%(refname:short) %(objectname:short)'
But still it is a complete list and I only need the last id.
Upvotes: 0
Views: 593