git tag older 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 <tag_name> HEAD (for the last commit)
git tag -a v1.2 9fceb02 -m "Message here"
$ git tag <tag_name> HEAD (for the last commit)