create tag from commit code example
Example 1: git tag a previous commit
git tag -a v1.2 9fceb02 -m "Message here"
Example 2: git tag from commit
$ git tag HEAD (for the last commit)
git tag -a v1.2 9fceb02 -m "Message here"
$ git tag HEAD (for the last commit)