Skip to content

How to Manage Git Tags

โ† Back to Git


๐Ÿท๏ธ Git Tags

Tags are used to mark specific points in history as important, often for releases (e.g., v1.0).

Create Lightweight Tag

A simple pointer to a specific commit.

git tag v1.0

Create Annotated Tag

Includes a tagging message and author details (recommended for releases).

git tag -a v1.0 -m "Release version 1.0"

List Tags

git tag

To search for tags:

git tag -l "v1.*"

View Tag Details

git show v1.0

Push Tags

Tags are not pushed by default. You must explicitly push them.

Push a single tag:

git push origin v1.0

Push all local tags:

git push origin --tags

Delete Tag

Delete a local tag:

git tag -d v1.0

Delete a remote tag:

git push origin --delete v1.0


๐Ÿง  Quick Quiz โ€” Tags

#

Which command pushes all your local tags to the remote repository?


๐Ÿ“ Want More Practice?

๐Ÿ‘‰ Start Git Intermediate Quiz (20 Questions)


๐Ÿ“ฌ DevopsPilot Weekly โ€” Learn DevOps, Cloud & Gen AI the simple way.
๐Ÿ‘‰ Subscribe here