git tags

Updated: 20 January 2024

Show tags

git tag

Add a tag to current commit

git tag tagname

Add an annotated tag to a specific commit

git tag -a tag_name commit_id -m "message"

Push tag to remote

git push origin tagname

List tags with date (from Stackoverflow)

git for-each-ref --sort=creatordate --format '%(refname) %(creatordate)' refs/tags

Delete a tag

git tag -d foo-tag

Leave a comment