C:>repo_path>git tag --list or C:>repo_path>git tag -l
Git supports two types of tags: lightweight and annotated.
A lightweight tag is very much like a branch that doesn’t change — it’s just a pointer to a specific commit.
Annotated tags, however, are stored as full objects in the Git database. They’re checksummed; contain the tagger name, email, and date; have a tagging message; and can be signed and verified with GNU Privacy Guard (GPG).
Creating an annotated tag in Git is simple. The easiest way is to specify -a when you run the tag command:
C:\>repo_path>git tag -a v1.0 -m "App Version 1.0"
The -m specifies a tagging message, which is stored with the tag.
You can see the tag data along with the commit that was tagged by using the git show command:
C:\>repo_path>git show v1.0
C:\>repo_path>>git push origin v1.0
C:\>repo_path>git push origin --tags
To delete a tag on your local repository, you can use git tag -d <tagname>. For example, we could remove our lightweight tag above as follows:
C:\>repo_path>git tag -d v1.0
Note that this does not remove the tag from any remote servers. There are two common variations for deleting a tag from a remote server.
C:\>repo_path>git push origin --delete v1.0
C:\>git checkout v1.0
if you need to make changes — say you’re fixing a bug on an older version, for instance — you will generally want to create a branch:
C:\> git checkout -b copyversion1.0 v1.0