如果设置了 --no-tags 选项,如何强制获取标签

发布于 2024-08-29 00:51:09 字数 215 浏览 6 评论 0原文

每当我运行 git fetch 时,它都会从 origin 获取所有标签。在一个有很多标签的项目中,这可能会变得相当麻烦。所以我运行了 git config remote.origin.tagopt --no-tags ,这样获取将不再获取标签。

但是,有时我确实想获取标签或单个标签。有谁知道该怎么做? (除了删除该配置并每次运行 git fetch --no-tags )

谢谢!

Whenever I run git fetch it fetches all the tags from origin. In a project with lots of tags, this can get quite bothersome. So I ran git config remote.origin.tagopt --no-tags so fetching will no-longer fetch tags.

However, there are some times when I do want to fetch tags, or a single tag. Does anyone know how to do this? (besides removing that configuration, and running git fetch --no-tags every time)

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

久隐师 2024-09-05 00:51:09

要获取单个标签,您可以使用 git fetch标签<标签名称>。

To fetch a single tag, you can use git fetch <remote-name> tag <tag-name>.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文