C
C#17mo ago
fastune

❔ How to get the latest git tag version BUT from a specific commit?

I need to get the latest git tag annotation relative to an older commit and not the latest tag in the whole branch. Google is constantly giving answers on how to get the latest git tag in the whole branch...
2 Replies
fastune
fastune17mo ago
To give an example. I want to get the latest git tag version relative to the commit I selected(blue highlight). I want it to return v0.0.9 and not 0.0.13 Lmao I decided to give ChatGPT a shot and it gave me the answer after a bit of chit chatting. The answer was simple and yet Google repeatedly failed to show me a SINGLE post showing it. This was the answer "git describe --tags --abbrev=0 <commit ID>^"
Accord
Accord17mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.