On Tue, Aug 23, 2011 at 6:43 PM, Phlip <[email protected]> wrote: > Now I'm still trying to go from a hashtag to a tag. I'll see if I can > follow up when I find it - it should be easy, right? > > git show-ref --tags | grep de049647a1ea285ce7791dc4ebf01ddfc564ddad >
If the tag is the only ref for that commit, you can use git name-rev de049647a1ea285ce7791dc4ebf01ddfc564ddad However, if de049647a1ea285ce7791dc4ebf01ddfc564ddad is also, say, the head of your master branch, then it might not necessarily pick that tag as the ref to give back. (I'm unsure how name-rev determines its results.) If you aren't looking to use it programmatically, you could maybe get away with git log --decorate --oneline -1 de049647a1ea285ce7791dc4ebf01ddfc564ddad Check the man page for name-rev if you want to find out more. It can be quite useful. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
