# 查看本地标签
git tag
git tag -n
git tag -l
git tag -l v1.0.*
# 查看远程标签
git ls-remote --tags origin
git tag v1.0.0 # 轻量标签
git tag -a v1.0.1 -m "说明" # 附注标签
# 基于历史Commit创建标签
git tag -a v1.0.2 <CommitID> -m "说明"
git tag v1.0.3 <CommitID>
git show v1.0.0 # 查看标签
git push origin v1.0.0 # 推送某个标签
git push origin --tags # 褪去所有标签
git tag -d v1.0.1 # 删除本地标签
git push origin :v1.0.2 # 删除远程标签
git push origin --delete v1.0.3 # 删除远程标签
git push origin :refs/tags/v1.0.4
# 删除本地全部标签
git tag|xargs git tag -d
# 删除远程全部标签
git show-ref --tag | awk '{print ":" $2}' | xargs git push origin
# 基于v1.2.0标签创建新分支
git checkout -b <NewBranch> v1.2.0
https://git-scm.com/book/zh/v2/Git-%E5%9F%BA%E7%A1%80-%E6%89%93%E6%A0%87%E7%AD%BE