DEV Community

Dênis Mendes
Dênis Mendes

Posted on • Edited on

1

Tag on Git

Tag is a nice way to keep system versions clear and arranged.
I like to tag my commits after I did them so I do tag like that:

First I run:

git log to see the commit checksum that I'll tag.

After I run:

git tag -a v1.2 9fceb02

Where 9fceb02 is my commit checksum.

So we have a new tag but it's only locally yet. Then I run:

git push --tags

Done!

If you need to see which tags were created you can run:

git tag

UPDATE I:
So some day you want to see the source code to the tag v1.2 what you need to do is that:

git checkout tags/v1.2

Now you're going to be able see the source code from tag v1.2.

UPDATE II:
You can see the log for a tag as well:

git log v1.2

Do you want to know more? Look at: https://git-scm.com/book/en/v2/Git-Basics-Tagging

UPDATE III:

I needed to remove a tag which I related with the wrong commit reference so I did that:

git push origin :tag_name

and also:

git tag --delete tag_name (it goes to delete locally)

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more