G. Sylvie Davies G. Sylvie Davies - 5 months ago 46
Git Question

How can I tell if a given git tag is annotated or lightweight?

I type

git tag
and it lists my current tags:


How can I determine which of these is annotated, and which is lightweight?


git for-each-ref tells you what each ref is to by default, its id and its type. To restrict it to just tags, do git for-each-ref refs/tags.