0
0
Gitdevops~5 mins

Lightweight vs annotated tags in Git - Quick Revision & Key Differences

Choose your learning style9 modes available
Recall & Review
beginner
What is a lightweight tag in Git?
A lightweight tag is a simple pointer to a specific commit. It acts like a bookmark without extra information like tagger name or date.
Click to reveal answer
beginner
What extra information does an annotated tag contain compared to a lightweight tag?
Annotated tags store the tagger's name, email, date, and a message. They are stored as full objects in Git's database.
Click to reveal answer
beginner
How do you create a lightweight tag in Git?
Use the command: git tag <tagname>. This creates a simple pointer without extra metadata.
Click to reveal answer
beginner
How do you create an annotated tag in Git?
Use the command: git tag -a <tagname> -m "message". This creates a tag with metadata and a message.
Click to reveal answer
intermediate
When should you use annotated tags instead of lightweight tags?
Use annotated tags when you want to record extra info like who created the tag, when, and why. Good for releases.
Click to reveal answer
Which Git tag type stores the tagger's name and date?
ABranch
BLightweight tag
CAnnotated tag
DCommit
What command creates a lightweight tag?
Agit tag <tagname>
Bgit tag -a <tagname> -m "msg"
Cgit commit -m "tag"
Dgit branch <tagname>
Which tag type is better for marking official releases?
AAnnotated tag
BLightweight tag
CTemporary tag
DDetached HEAD
What does the -a option do in git tag -a?
ACreates a lightweight tag
BLists all tags
CDeletes a tag
DCreates an annotated tag
Which tag type is just a simple pointer without extra data?
ARemote tag
BLightweight tag
CSigned tag
DAnnotated tag
Explain the difference between lightweight and annotated tags in Git.
Think about what extra information you get with annotated tags.
You got /4 concepts.
    When and why would you choose to use an annotated tag over a lightweight tag?
    Consider the value of extra information in project history.
    You got /4 concepts.