git tag a specific commit — create and push tags

# Tag the current HEAD (most common)
git tag v1.0.0

# Tag a specific commit by hash
git tag v1.0.0 abc1234

# Push the tag to remote
git push origin v1.0.0

# Push all local tags at once
git push origin --tags

You want to mark a release point in history, so you can easily reference it later with git checkout v1.0.0.

Annotated tag (recommended for releases)

Annotated tags store the tagger name, date, and message — unlike lightweight tags.

git tag -a v1.0.0 -m "Release 1.0.0"
git push origin v1.0.0

List all tags

git tag -l
git tag -l "v1.*"    # filter by pattern

Delete a tag locally and on the remote

git tag -d v1.0.0                        # delete local
git push origin --delete v1.0.0          # delete remote