so the git tag
command lists the current git tags
tag1
tag2
git tag -n
prints tag's message
tag1 blah blah
tag2 blah blah
What's the best way to get the hash of tag1 & tag2 ?
so the git tag
command lists the current git tags
tag1
tag2
git tag -n
prints tag's message
tag1 blah blah
tag2 blah blah
What's the best way to get the hash of tag1 & tag2 ?
Annotated tags have their own SHA−1, so we need to dereference them. However lightweight tags cannot be dereferenced, as they already point to a commit. To solve, we must list both and filter the commit objects:
Result with lightweight tags:
Result with annotated tags: