【发布时间】:2013-12-15 08:28:30
【问题描述】:
--branch还可以在结果存储库中的该提交处获取标签并分离 HEAD。
我试过了
git clone --branch <tag_name> <repo_url>
但它不起作用。它返回:
warning: Remote branch 2.13.0 not found in upstream origin, using HEAD instead
这个参数怎么用?
【问题讨论】:
-
你是对的,但差别不大。当我问这个问题时,在我的情况下,我需要在一行中执行此操作并且必须使用
clone,我被困在“为什么 --branch 不起作用”。该网址的最佳答案使用clone->checkout,这无法解决我的问题。 :)