开发者

Output from 'git ls-remote' shows tags not found in 'git tag -l'

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

Howeve开发者_如何转开发r, 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?


Try git fetch --tags - from git-fetch documentation:

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜