2013-04-03 29 views
3

后失踪的标签,是不是重复的(几乎,因为计算器不会允许)确切的标题
Git Pull - Everything up to date, but it's not的Git - 拉

我失去了两个标签(Linux内核V3.9-RC4和特别是v3.9-rc5)以及它们带来的变化。 我尝试了太多的命令,并用完了灰色单元格。

git reset 
git reset --hard 
git checkout HEAD 
git pull 
git fsck 
git reset --hard HEAD 

问:我的ISP有可能搞砸了他们的缓存(因为他们已经这样做了)并导致所有这一切?

+1

为什么在世界上你会不会让标题与你引用的不那么重复的问题有所不同? –

+0

因为它基本上是一样的,你会建议什么? – Behrooz

+0

哦,这是不同的......对不起 –

回答

14

我想你想要git fetch --tags。从git-fetch手册页:

-t, --tags 
     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.<name>.tagopt setting. See git- 
     config(1). 

如果这不起作用,请张贴的git fetch --tags --verbose输出。

2

尝试

git pull --tags 

多余字符。

+0

它的git fetch --tags,并没有工作。请参阅问题中的评论。 – Behrooz

+0

引用来自[git pull docs](https://www.kernel.org/pub/software/scm/git/docs/git-pull.html) --no-tags 默认情况下,指向对象的标记从远程存储库下载的内容将在本地获取并存储。该选项将禁用此自动标记。遥控器的默认行为可以通过遥控器指定。 .tagopt设置。请参阅git-config(1)。 该文档甚至不提及'--tags'开关。它真的可用吗? –

0

感谢迈克我发现这个问题,
我的遥控器已经改变了汽车魔术。我仍然不知道如何。
如果有人能解释这一点,这将是一件好事。

git remote add torvalds https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git 
0

mpontillo写了4月3日在'13 18:05

git fetch --tags

如果您具有上游,使用

git fetch --tags --all

--tags意味着 “所有标签”

--all的意思是“所有遥控器”(即起源和上游)