I am new to GIT. Last week I checked out my code to a tag. I forgot the tag name and apparently have some issue with code, so I want to know which tag I checked out from. How can I find that?
You can use the git describe
command to find the "closest" tag associated with your current commit:
git describe --tags
For example, in a sample repository this gives me:
testtag-2-g25a38be
This means I am at commit g25a38be
, which is two commits beyond the tag testtag
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.