参考pro git 2.6总结的
Light weight--only point to the commit
COMMAND : git tag v1.0.0
Annotated
COMMAND : git tag -a v1.0.0 -m 'nexus first board'
Show Tag
1. show all tags
COMMAND : git tag
2. Show the specific tag
COMMAND : git tag v1.0
Advanced Skill
How to add a tag to old commit if I have forgot to tag one?
1.Firstly , show your commit
COMMAND : git log --pretty=oneline
Results is like this:
e1c6c38fab23f8281267b0b41109a48dd2a26227 set TARGET_ROCKCHIP_PCBATEST to false
87fd66414c1027febdcfa8554d0f2fdb66290c6f add last-one hot key
2.I want to tag this commit 'add last-one hot key'
COMMAND :git tag -a v1.2.1 87fd66 -m 'Add a new tag'
note:87fd66 is the begin of the commit number.
Share your tag:
1. Push Specific tag
COMMAND : git push origin v1.2.1
2. Push all the tags
COMMAND : git push origin --tags