git add tag to last commit code example
Example 1: add changes to last commit
git add the_left_out_file
git commit --amend --no-edit
Example 2: git add tag
git tag -a v1.2
git push origin v1.2
Example 3: create a tag from a commit/branch
git tag -a version.number -m "Tag Message"
git push origin <tagname>
Example 4: git tag a previous commit
git tag -a v1.2 9fceb02 -m "Message here"
Example 5: git tag from commit
$ git tag <tag_name> HEAD (for the last commit)