如何用git获取覆盖本地标记? [英] How to overwrite local tags with git fetch?

查看:170
本文介绍了如何用git获取覆盖本地标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何用git获取覆盖本地标记?
我想用远程代码替换本地标签。 会做到这一点。

文档 - 标记参数的描述):


大多数标记会在下载分支头时自动获取,但是不会指向正在被跟踪的分支头可到达的对象的标签将不会被此机制获取。该标志允许下载所有标签及其相关对象。远程的默认行为可以使用remote ..tagopt设置来指定。



How to overwrite local tags with git fetch? I want to replace local tags with remote tags.

解决方案

git fetch --tags will do it.

From the docs (description of the --tags parameter):

Most of the tags are fetched automatically as branch heads are downloaded, but tags that do not point at objects reachable from the branch heads that are being tracked will not be fetched by this mechanism. This flag lets all tags and their associated objects be downloaded. The default behavior for a remote may be specified with the remote..tagopt setting.

这篇关于如何用git获取覆盖本地标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆