Interview Prep/Git & GitHub/Branching Strategies and Releases

Should releases use lightweight or annotated tags?

BeginnerScenarioBranching Strategies and Releases
Answer

Situation read → Tags mark release points; the type decides what metadata they carry.

What I'd do →

  1. Use annotated tags: git tag -a v1.8.0 -m "Release 1.8.0".
  2. Sign them if policy requires: git tag -s v1.8.0 -m "...".
  3. Push explicitly: git push origin v1.8.0 (or --follow-tags for annotated ones).
  4. Verify with git show v1.8.0.

Why → Annotated tags are full objects with tagger, date and message, and git describe prefers them. Lightweight tags are just refs.

Interview tip → git push does not send tags by default.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branching Strategies and Releases