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 Beginner Quiz (20 Questions)


📬 DevopsPilot Weekly — Learn DevOps, Cloud & Gen AI the simple way.
👉 Subscribe here