目前用的
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ./repo
$ chmod 755 ./repo
---------------------------------------------------------------
先在 git server 開一個 "manifest" 的專案
default.xml,並將此檔案push到git server
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="repo-server" fetch="/home/ubuntu/test/repo-server" review="review.source.android.com" />
<default revision="master" remote="repo-server" />
<project name="external/example1" path="external/example1"/>
<project name="external/example2" path="external/example2"/>
</manifest>
其中
default revision=master //default branch is master
目前還不知道下載時,如何指定預設的branch (repo init -u https://xxx -b branch_name)
所以可以先用以下的方法 new_branch.xml
<manifest>
<remote name="repo-server" fetch="/home/ubuntu/test/repo-server" review="review.source.android.com" />
<default revision="new_branc" remote="repo-server" />
<project name="external/example1" path="external/example1"/>
<project name="external/example2" path="external/example2"/>
</manifest>
下載時
$ repo init -u URL -m new_branch.xml
$ repo sync -j4
這樣下載後,預設branch就會是 new_branch
ref:
1. Repo 命令参考资料
2. Installing Repo
沒有留言:
張貼留言