repo init推荐使用-b 分支标签、–depth=1和–platform=auto这几个选项加快速度
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-8.1.0_r75 --depth=1 --platform=auto
init的参数
-u: 指定manifest仓库地址
-m: 选择仓库中某个manifest文件,如果没有设置,就使用default.xml
-b: 指定一个分支或修正版本
同步检出工作区 即代码树中.repo之外的代码
repo sync推荐使用–current-branch选项加快速度
repo sync --current-branch
sync参数
-j : 多任务,一般8核心可以开到16任务,过多会起反作用
-c: 只下载当前分支代码
-d: 让工程回退到manifest指定的版本
-f: 如果某个工程同步失败,继续同步
检出xxx分支,没有此分支则基于manifest的default设置的默认分支创建
从远程库同步下来的项目是没有分支的,所以必须要创建xxx项目的分支
查看repo分支
切换分支
删除分支
查看修改