git-repo (aosp repo) 工具再次从本地缓存检出项目

git-repo (aosp repo) tool checking-out projects again from local cache

我们使用 google git-repo 工具 (aosp repo) 来管理许多 git 存储库的工作区。但是,如果您想进行与上一个工作区完全相同的干净检出,使用命令 repo sync 将首先从远程提取所有更改。

如何只从当前位于 .repo/ 目录中的本地缓存中获取本地存储库?

您可以使用:

repo sync --local-only

来自回购帮助:

$ repo help sync
[...]
-l, --local-only      only update working tree, don't fetch