$ git tag hello
$ git describe --tags
hello
... work work ...
$ git commit -m "work stuff"
$ git describe --tags
hello-1-48281
Say what? What’s the extra stuff? Doesn’t look like a SHA1… is it possible to just get “hello” back?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
“git describe” probably doesn’t do what you think it does:
So, in your example of “hello-1-48281”, git is saying, “the
hellotag is separated by 1 commit from the current object, which is48281.”If you want a list of tags instead, just do
git tag -l.