G. Sylvie Davies G. Sylvie Davies - 25 days ago 14
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:

1.2.3
1.2.4


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

Answer

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.

Comments