📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Git & GitHub Git Tags

Git Tags

4 min read Quiz at the end
Create lightweight and annotated tags for releases, push them to remote, and check them out.

Git Tags

# Lightweight tag (just a pointer)
git tag v1.0

# Annotated tag (recommended — has metadata)
git tag -a v1.0 -m "Release version 1.0"
git tag -a v1.0 abc1234 -m "Tag old commit"

# List tags
git tag
git tag -l "v1.*"

# Show tag details
git show v1.0

# Push tags
git push origin v1.0
git push origin --tags

# Delete
git tag -d v1.0
git push origin --delete v1.0

# Checkout tag (detached HEAD)
git checkout v1.0
Topic Quiz · 1 questions

Test your understanding before moving on

1. What is the difference between a lightweight and annotated tag?
💡 Use annotated tags (-a) for releases — they include metadata and can be GPG signed.