Tags allow marking a particular point on the history of the code.
It should be preferred to use annotated tags because they are independent objects, with their own description message (instead of referencing the message of a commit).
To create a tag after the last commit:
git tag -a <tag-name> -m '<tag-message>'
Eventually, it's also possible to tag an old commit:
git tag -a <tag-name> <hash-old-commit> -m '<tag-message>'
To push a specific tag on a remote repository:
git push origin <tag-name>
To list all the tags present in the local repository:
git tag
Then it's possible to inspect on particular tag:
git show <tag-name>
To delete a specific tag:
git tag -d <tag-name>
Then it's necessary to push the change to the remote repository:
git push origin --delete <tag-name>
In case it's necessary to change only the description message associated to a specific tag:
git tag -a <tag-name> -f -m <tag-message>
For a full descriptive list of all options:
git help tag