Tags are like branches that never move — perfect for marking release versions:
# Lightweight tag (just a name, no extra data)
git tag v1.0.0
# Annotated tag (recommended — stores tagger, date, message)
git tag -a v1.0.0 -m "Release version 1.0.0"
# Tag a specific commit
git tag -a v0.9.0 abc1234 -m "Beta release"
# List tags
git tag
git tag -l "v1.*" # filter by pattern
# Push tags to remote
git push origin v1.0.0
git push origin --tags # push all tags
The industry standard is MAJOR.MINOR.PATCH:
MAJOR — breaking changesMINOR — new features, backwards compatiblePATCH — bug fixesCreate an annotated tag v1.0.0 on the current commit with message "First stable release".
Click "Run" to execute your code.