Beginner LevelGit & GitHub
What is the difference between Annotated Tags and Lightweight Tags in Git?
❓ Interview Prompt: Compare Lightweight tags vs Annotated tags (git tag -a), cryptographic checksumming, tagger metadata, and pushing tags.
Lightweight tags are simple pointers to specific commit hashes. Annotated tags (git tag -a v1.0.0 -m "message") are full checksummed Git objects storing tagger name, email, date, and message. Push tags explicitly via git push origin --tags.
Code Implementation Example
bash
git tag -a v1.2.0 -m "Release 1.2.0"
git tag -l
git push origin --tags💡Creating and pushing annotated production release tags.
🎯 Interview Key Takeaway
Always use annotated tags (git tag -a) for software releases and push them explicitly using git push origin --tags.
#git tag#Annotated Tags#Releases#Beginner
Back to all Git & GitHub Questions→