On Sun, Jan 29, 2012 at 2:57 PM, Thomas Ferris Nicolaisen

> Hi Kevin,
> git tag --contains [commit-id]

This doesn't do the job exactly though, it will list any tags whose
corresponding commit is either the named commit, or one of its parents.

So if we have a history (linear here to simplify, with parents to the left
and children to the right

a(v0.1) b c d(v1.1) e

Then git tag --contains x
will return v0.1 AND v1.1 if x is d or e
and v0.1 if x is any of a, b, or c.

Note that not ever commit has a tag.

Rick DeNatale

Google+: +Rick DeNatale <https://plus.google.com/102541178931067955550>
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

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 git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to