Git — Tags
Create Tag
git tag v1.0.0
Annotated Tag
git tag -a v1.0.0 -m "Version 1.0.0 release"
Tag Specific Commit
git tag -a v1.0.0 commit-hash
List Tags
git tag
git tag -l "v1.*"
Push Tags
# Push specific tag
git push origin v1.0.0
# Push all tags
git push origin --tags
Delete Tag
# Local
git tag -d v1.0.0
# Remote
git push origin --delete v1.0.0
Checkout Tag
git checkout v1.0.0
Semantic Versioning
| Tag | Description |
|---|---|
| v1.0.0 | Major release |
| v1.1.0 | Minor release |
| v1.0.1 | Patch release |
Mini Practice
- Create a tag
- Push tags to remote
- Delete a tag
- Use semantic versioning
Up Next
Continue with Logs — viewing commit history.
Related Topics
Frequently Asked Questions about Tags
What is Tags in Git?
Tags is a fundamental concept in Git. This lesson explains it step by step with clear examples, making it easy for beginners to understand.
How do I learn Tags?
Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn Tags.
Why is Tags important in Git?
Tags is essential for Git development. Understanding this concept will help you write better code and solve real-world problems more effectively.