git tag to a commit code example
Example 1: git commit and tag
git tag -a v1.0 7cceb02 -m "Your message here"
Example 2: git tag from commit
$ git tag <tag_name> HEAD (for the last commit)
git tag -a v1.0 7cceb02 -m "Your message here"
$ git tag <tag_name> HEAD (for the last commit)