如何用git获取覆盖本地标记? [英] How to overwrite local tags with git fetch?
问题描述
如何用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屋!