Interview Questions/Phone Screen/Annotated vs Lightweight Git Tags
BeginnerPhone
2 min

Annotated vs Lightweight Git Tags

GitVersion ControlRelease Engineering
Advertisement
Interview Question

What is the difference between an annotated tag and a lightweight tag in Git, and when would you choose each?

Key Points to Cover
  • Annotated tags are full objects with metadata/signature; lightweight are pointers to a commit
  • Annotated preferred for releases (authors, messages, signing)
  • Lightweight for quick local markers or temporary refs
Evaluation Rubric
Defines annotated tags and benefits40% weight
Defines lightweight tags and use30% weight
Provides correct selection guidance30% weight
Hints
  • 💡Mention `-a`, `-s`, and `git describe`.
Potential Follow-up Questions
  • How do you push tags to remote?
  • How to delete a remote tag?
Advertisement