以Android2.3爲例,在自己的局域網服務器裏建立一個Android2.3 repo。
1. 下載Android2.3 mirror版本
repo init -u git://codeaurora.org/plaform/manifest.git --mirror -b gingerbread -m M76XXTSNCJNLYA61801002.xml
repo sync
2. 將mirror版本拷貝到局域網服務器上
3. 從局域網服務器上下載代碼到本地機器
repo init -u git://192.168.10.239/platform/manifest.git -b gingerbread
修改.repo/manifest.xml文件,更改下載path如下
(<remote fetch="ssh://[email protected]/home/git/repo/android2.3/" name="caf" review="codeaurora.org"/>)
git commit; git push
repo sync
4. 創建branch
repo start s8 --all
修改 .repo/manifest.xml,更改revision爲s8
git commit; git push
5. repo forall -c "git push caf s8:s8"