android - Repo(GIT)如何在使用镜像时更新 list 文件?

标签 android git repo

我们使用现有 list 在本地发起了一个 repo 。

repo init -u ssh://ger-repository/my_project-manifests -m my_manifest.xml --mirror  

现在, list 文件发生了变化。无法运行 init 命令:

fatal: --mirror not supported on existing client

我们如何在不删除所有镜像文件夹并再次重新同步的情况下更新 list ?

最佳答案

这可能是不可能的,考虑到 this patch建议将该错误消息替换为:

fatal: --mirror is only supported when initializing a new workspace.
Either delete the .repo folder in this workspace, or initialize in another location.

如果这是关于相同的 repo 协议(protocol),但具有不同的 URL,则 this thread提到:

If you've been able to clone all the gits you're almost there, just use the insteadOf trick on the clients if the relative URLs aren't available in the manifest you're mirroring.

[url "https://yourserver.example.com/"]
        insteadOf = https://android.googlesource.com/

关于android - Repo(GIT)如何在使用镜像时更新 list 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51915115/

相关文章:

android - 在Android Studio 3.x和CMake中静态链接库

android - 将 AWS 的 DynamoDB 中的列表与不同类型的对象一起使用

android - 替换默认的未捕获异常处理程序以避免崩溃对话框

android - 如何在 CentOS 上运行 repo android?

android - 在 Android Repo 项目中切换 Git 分支

ios - cocoapods - 'pod install' 需要永远

android - 如何在 firebase 的分析中将事件发送到操作 - Android

git - 与Beyond Compare一起使用时如何退出git difftool?

git - 使用 .git/info/exclude 为时已晚

git - git如何比较文件?