以android的recovery项目为例,目前git branch -r中只有A仓库的分支
git branch -r
m/dev -> A/branch_nameA
A/master
这是因为manifest中的recovery项目配置为:
<remote name="A" fetch="ssh://git@git.****.cn/A/" review="gerrit.pt.A.com" />
<project name="A/bootable/recovery" path="bootable/recovery" remote="A" revision="branch_nameB"/>
如果要添加远程仓库B中的recovery,
1 下一套含有remote A的代码
2 cd bootable/recovery
3 git remote add B ssh://git@****.*****.cn/platform/bootable/recovery
4 git fetch B
标签:git,remote,recovery,bootable,project,仓库,branch,远程
From: https://blog.51cto.com/u_16248677/7386457