What command shows the commit that a tag is pointing to?
Posted by FrankMl
Last Updated: July 15, 2024
To see the commit that a specific tag is pointing to in Git, you can use the following command:
git show <tag-name>
Replace <tag-name> with the name of the tag you want to inspect. This command will display the commit details, including the commit hash, author, date, and the changes made in that commit. Alternatively, if you only want to see the commit hash that the tag points to without additional details, you can run:
git rev-parse <tag-name>
This will output the commit hash corresponding to the specified tag.