1. 本地新增有注释的tag
git tag -a 'V1.0.0' -m 'only test'
2.将tag推送到远程分支
方法1:
git push origin refs/tags/V1.0.0
方法2:
git push origin V1.0.0
3.删除本地分支标签
git tag -d V1.0.0
4.删除远程分支标签
git push origin :refs/tags/V1.0.0
5.注意点:
1)提交远程和删除远程命令的区别:
2) tag创建好以后,其他分支也会存在,在任何一个分支中删除,其他分支也不存在
3)删除本地分支tag之后才能删除远程分支的tag