来自“git ls-remote”的输出显示在“git tag -l”中找不到的标签
我正在按照 Pro Git 的指导将 SVN 存储库转换为 Git 存储库(可在此处找到:http:// progit.org/book/ch8-2.html )。
推送到我新创建的遥控器后,我从所述遥控器进行了克隆。新克隆没有任何关于我的标签的信息。然后我从原来的版本中做了一个“git push --tags”。然而,当在克隆中执行“git pull”时,只有少数标签会下来。
从克隆内部,“git ls-remote”显示了我的所有标签(和分支)。为了清楚起见,我删除了哈希值:
HEAD
refs/heads/STABLE-1.0
refs/heads/UNSTABLE-1.0
refs/heads/master
refs/tags/RELEASE-0.4
refs/tags/RELEASE-0.9
refs/tags/RELEASE-1.0
refs/tags/STABLE-1.0
refs/tags/UNSTABLE-1.0
但是,执行“git tag -l”仅显示:
RELEASE-1.0
UNSTABLE-1.0
远程分支似乎跟踪良好。我注意到的唯一工件是原始 git-svn 存储库仍然具有本地和远程分支。这应该不重要,因为我将在克隆中工作,一旦我确认所有数据都已迁移,git-svn 存储库就可以停用。
那么为什么远程和本地标签不匹配呢?
I am converting a SVN repository to a Git repository following guidance from Pro Git (found here: http://progit.org/book/ch8-2.html ).
After pushing to my newly created remote, I did a clone from said remote. New clone did not have any information about my tags. I then did a 'git push --tags' from the original. However, when doing a 'git pull' in the clone, only a few of the tags come down.
From inside the clone, 'git ls-remote' shows all of my tags (and branches). I removed the hashes for clarity:
HEAD
refs/heads/STABLE-1.0
refs/heads/UNSTABLE-1.0
refs/heads/master
refs/tags/RELEASE-0.4
refs/tags/RELEASE-0.9
refs/tags/RELEASE-1.0
refs/tags/STABLE-1.0
refs/tags/UNSTABLE-1.0
However, doing a 'git tag -l' only shows:
RELEASE-1.0
UNSTABLE-1.0
Remote branches seem to be tracking fine. Only artifact I noticed there is the orignal git-svn repo has the local and remote branches still. That should not matter since I will be working in a clone, and once I confirm all data is migrated, the git-svn repo can be decommissioned.
So why do the remote and local tags not match?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
git fetch --tags
- 来自 git-fetch 文档:Try
git fetch --tags
- from git-fetch documentation: