Android repo command and switching branches

无人久伴 提交于 2019-11-29 23:05:38
gparent

If you run repo init a second time with a different branch, you can simply repo sync and it will not download the entire source code again.

The repo -b parameter specifies the branch of the .repo/manifests git repository that should be checked out. The default.xml file in this repository defines which branch each of the other git repositiories (projects) should be on.

It seems that repo is written in such a way that if you check out another manifest branch are repo sync again it will pull all the code again over the network.

You can run repo forall -c 'git checkout branch_name' which will checkout the specified branch for all projects that are declared in your current manifest but if there are projects added/removed between gingerbread and ics (which there are), then you won't get the code for these projects.

Running git checkout branchname in the .repo/manifests repository then running repo sync may enable you to save some network overhead.

Otherwise, due to the limitations of repo, the only real way to do it is to maintain two working copies of the aosp or be prepared to re-sync.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!