# 标签
标签作为commit的别名使用
# 创建Tag
git tag <tagName> # 普通Tag,默认基于最新的commitId
git tag <tagName> <commitId> # 指定commitId
git tag -a <tagName> -m 'XXX' # 附注Tag(带有注释的Tag)
git push origin <tagName> # 推送到远程仓库
git push origin --tags # 远程推送所有tags
# 查看Tag
git show <tagName> # 查看tag详情
git tag # 查看所有tag
git ls-remote --tags origin # 查看远程tag
# 删除Tag
git tag -d <tagName> # 本地删除
git push origin :<tagName> # 远程删除
# 检出分支
git checkout -b <branchName> <tagName>
← 安装部署