2

我想使用特定标签将远程树同步到我的本地机器。使用 git checkout 以外的标签同步树的最佳方法是什么。因为如果我使用 git checkout 我需要为每个 repo 同步最新的树顶部,然后结帐到那个特定的标签。

4

2 回答 2

2

You can use

   repo init -u <path to manifest repo> -m <manifest name> -b refs/tags/<tag_name>
于 2013-12-24T10:01:52.557 回答
2

你可以先做一个:

git fetch ; git fetch --tags

(2 次提取,只是为了确保获得所有提交:请参阅“ “'git fetch --tags'” 是否包含“'git fetch`'? ”)

它不会更新您的本地工作树(与 a 相反git pull)。

从那里,您可以执行以下操作:

git checkout aTag    

(有效,但让您处于分离的头部模式)

于 2013-04-19T08:20:13.097 回答