What Are Tags?
Tags attach a name to a specific commit — commonly used for release version numbers.
Create a Tag
Lightweight Tag
git tag v1.0.0
Annotated Tag (Recommended)
git tag -a v1.0.0 -m "Release version 1.0.0"
Tag a Past Commit
git log --oneline
git tag -a v1.0.0 COMMIT_ID -m "Release version 1.0.0"
View Tags
git tag # List all tags
git tag -l "v1.*" # Filter by pattern
git show v1.0.0 # Tag details
Push Tags to Remote
git push origin v1.0.0 # Push a specific tag
git push origin --tags # Push all tags
Delete Tags
git tag -d v1.0.0 # Delete local tag
git push origin --delete v1.0.0 # Delete remote tag
Create a GitHub Release
- Go to the repository on GitHub
- “Releases” → “Create a new release”
- Select a tag or type a new tag name
- Add release notes → “Publish release”
Common Pitfalls
- Tags don’t push automatically — you must push them explicitly
- Annotated tags store author, date, and message; lightweight tags do not
- Semantic versioning (
v1.0.0) is the standard convention
You can also trigger a GitHub Actions workflow on tag push. See GitHub Actions: Basic Auto-Deploy Setup.
Related Posts
- How to Push Your First Repository to GitHub
- Git Branch Basics: Create and Switch Branches
- GitHub Actions: Basic Auto-Deploy Setup
- How to View Commit History with git log
Recommended Services
- Fiverr - Find freelance developers and tech experts