$ curl http://android.git.kernel.org/repo >~/bin/repo $ chmod a+x ~/bin/repo $ export PATH=$PATH:~/bin
- 提供 –mirror 参数调用 repo init ,建立 git 版本库克隆
$ repo init -u git://android.git.kernel.org/platform/manifest.git --mirror
- 使用 –morror 则下一步和源同步的时候,本地按照源的版本库组织方式进行组织,否则会按照 manifest.xml 指定的方式重新组织并检出到本地
- 开始和源同步
$ repo sync
$ tree -L 1 .repo/
-L n 只显示 n 层目录 (n 为数字)