默认情况下,git push并不会把tag标签传送到远端服务器上,只有通过显式命令才能分享标签到远端仓库。
1.push单个tag,命令格式为:git push origin [tagname]
例如:
git push origin v1.0 #将本地v1.0的tag推送到远端服务器
2.push所有tag,命令格式为:git push [origin] --tags
例如:
git push --tags
或
git push origin --tags
注:上述命令运行后,如果其他人clone远端服务器代码或进行pull同步后,也会看到这些标签。
1.push单个tag,命令格式为:git push origin [tagname]
例如:
git push origin v1.0 #将本地v1.0的tag推送到远端服务器
2.push所有tag,命令格式为:git push [origin] --tags
例如:
git push --tags
或
git push origin --tags
注:上述命令运行后,如果其他人clone远端服务器代码或进行pull同步后,也会看到这些标签。
本文介绍了如何将本地Git仓库中的标签推送到远程仓库的方法,包括推送单个标签及所有标签的具体命令,并说明了标签被推送后的效果。
1283

被折叠的 条评论
为什么被折叠?



