如何提交 git 标签?
我已成功对中央 git 存储库进行、提交和推送更改。 我现在意识到我想标记所有文件的当前版本。 所以我这样做:
git tag -a 0.5
那就成功了。 但现在我尝试 git push 并被告知没有什么可以提交的。 如何将新标签推送到中央存储库?
(请注意,git tag
显示标签 0.5,但仅在本地)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你想要
这样,嗯,推送你的所有标签:)
当然还有一些替代方案,这就是 git 和 all(用你选择的存储库替换 origin):
或
参见 git-push(1) 了解更多详细信息。 “git Ready” 在他们的 标记文章。
I think you want
as that, well, pushes all your tags :)
There are some alternatives of course, this being git and all (replace origin with your repo of choice):
or
See git-push(1) for further details. "git ready" has some useful info in their tagging article as well.
自 git 1.8.3(4 月 22 日, 2013),尝试一下:
当您推送新提交时,这些提交引用的任何标签也会被推送。
在您的情况下,已经推送的提交引用的任何标签也应该被推送。
这允许您在推送提交和标签时始终使用一个命令。
Since git 1.8.3 (April 22d, 2013), try a:
When you push new commits, any tag referenced by those commits would be pushed as well.
In your case, any tag referenced by a commit already pushed should be pushed too.
That allows you to always use one command when pushing commits and tags.