Git, tags are used to typically to indicate important milestones such as
releases
or
version
numbers.
Lightweight tags:
git tag v1.0.0 // tags for previous commits (refers to the last commit)
git tag v1.0.0 <commit-hash> // tag for specific commit
Annotated tags:
git tag -a v1.0.0 -m "Version 1.0.0 release"
checkout to tag:
git checkout v1.0.0
git checkout master // to return the last commits again
Listing all tags:
git tag
Deleting a tag: // deletes only tag - not commits
git tag -d v1.0.0
Create a tag for a branch:
git tag v1.0.0 master
push tag to a remote repository
git push origin v1.0.0