Interview Q&A / Git & GitHub

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What is the difference between a lightweight tag and an annotated tag?

SHORT ANSWER

A lightweight tag is just a name pointing to a commit. An annotated tag is a full object storing the tagger, date and a message, and can be signed. Annotated tags are recommended for releases.

Explain it simply

A lightweight tag is a sticky note with a name on a page. An annotated tag is a proper label with who wrote it, when, and why.

git tag v1.0 creates the lightweight kind. git tag -a v1.0 -m "First release" creates an annotated one, which git show v1.0 displays with its message. Tools like git describe use annotated tags by default, and releases on GitHub work better with them. Both point at a commit and neither moves when new commits are made.

Example

bash
git tag v0.9                          # lightweight
git tag -a v1.0 -m "Release 1.0"     # annotated
git show v1.0
git tag -l "v1.*"

What to say in the interview

"A lightweight tag is only a pointer to a commit. An annotated tag stores tagger, date and message, and can be signed with GPG. I use annotated tags for releases and lightweight ones for temporary personal markers."

#git#tags#release

Related questions

Practise more Git & GitHub questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Git & GitHub quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.