wit tag # List all tagswit tag v1.0.0 # Create lightweight tagwit tag -a v1.0.0 -m "msg" # Create annotated tagwit tag -d v1.0.0 # Delete tagwit tag -l "v1.*" # List tags matching patternwit tag -v v1.0.0 # Show tag details
# List all tagswit tag# v0.1.0# v0.2.0# v1.0.0# v1.0.1# List tags matching patternwit tag -l "v1.*"# v1.0.0# v1.0.1# List with release candidateswit tag -l "*-rc*"# v2.0.0-rc1# v2.0.0-rc2
# Show tag informationwit tag -v v1.0.0# Output for annotated tag:# tag v1.0.0# Target: abc1234# Type: annotated# Tagger: Jane Doe <jane@example.com># Date: 3/15/2024, 2:30:00 PM## Release version 1.0.0## Features:# - New dashboard UI# - Improved performance# Output for lightweight tag:# tag v0.1.0# Target: def5678# Type: lightweight
You can also use wit show to view the tag and its associated commit:
# 1. Ensure you're on the release commitwit switch mainwit pull# 2. Create an annotated tag with release noteswit tag -a v1.0.0 -m "Release v1.0.0Features:- New user dashboard- API improvements- Performance optimizationsBug fixes:- Fixed login timeout issue- Corrected date formatting"# 3. Push the tagwit push origin v1.0.0# Or push all tagswit push --tags
# Tag a specific commitwit tag -a v0.9.0 abc1234 -m "Retroactive tag for v0.9.0"# Find the commit you want to tagwit log --oneline# def5678 Add feature X# abc1234 Prepare for release <- tag this one# 111222 Fix bug
# Major releasewit tag -a v2.0.0 -m "Version 2.0.0 - Complete rewriteBreaking changes:- New API endpoints- Removed deprecated functionsMigration guide: https://docs.example.com/migrate-v2"# Patch releasewit tag -a v1.0.1 -m "Hotfix for authentication bug"# Pre-releasewit tag -a v2.0.0-rc1 -m "Release candidate 1 for v2.0.0"
# Find which tag contains a commitwit tag --contains abc1234# List tags in version orderwit tag -l "v*" | sort -V# Get the latest tagwit describe --tags --abbrev=0
# If you need to move a tag to a different commitwit tag -d v1.0.0wit tag -a v1.0.0 <new-commit> -m "Release v1.0.0"# Or force replacewit tag -f v1.0.0 <new-commit>
Moving published tags is discouraged as it can confuse users who have already referenced the old tag.