Ahmed
Ahmed

Reputation: 15039

How to tag a git revision and then listing tagged revisions

I want to tag some of my revisions in a git repo and then list the revisions which are tagged. Please advise, thanks

Upvotes: 2

Views: 166

Answers (2)

Piotr Wach
Piotr Wach

Reputation: 1005

git tag <tag name> to create a tag, if you want to create a tag for previous revision you can git checkout and then git tag. More info here: http://www.kernel.org/pub/software/scm/git/docs/git-tag.html

To list all the tags do git tag -l

Upvotes: 1

Noufal Ibrahim
Noufal Ibrahim

Reputation: 72745

git tag <tagname> <commit> creates a tag pointing to a commit. git tag will list all the tags and git show <tagname> will give you details about the commit that points to. The show command works for any treeish.

Also, you should really read the docs. This is a rather simple question you could have gotten the answer to by just skimming the documentation.

Upvotes: 2

Related Questions