From: http://blog.csdn.net/openme_openwrt/article/details/8164705
《Repo——另一个Git协同模型》 http://www.worldhello.net/2010/08/31/1884.html
《Android repo 魔法》 http://www.worldhello.net/2010/08/31/1915.html
《Why Git is better than SVN》 http://www.worldhello.net/2012/04/12/why-git-is-better-than-svn.html
《Version Control with Repo and Git》 http://source.android.com/source/version-control.html
提供 --mirror 参数调用 repo init ,建立 git 版本库克隆
$ repo init -u git://android.git.kernel.org/platform/manifest.git --mirror
使用 --morror 则下一步进行源同步的时候,本地按照源的版本库组织方式进行组织,否则会按照 manifest.xml 指定的方式重新组织并检出到本地
- repo init -h
- Usage: repo init -u url [options]
- Options:
- -h, --help show this help message and exit
- Logging options:
- -q, --quiet be quiet
- Manifest options:
- -u URL, --manifest-url=URL
- manifest repository location
- -b REVISION, --manifest-branch=REVISION
- manifest branch or revision
- -m NAME.xml, --manifest-name=NAME.xml
- initial manifest file
- --mirror mirror the forrest
- --reference=DIR location of mirror directory
- --depth=DEPTH create a shallow clone with given depth; see git clone
- -g GROUP, --groups=GROUP
- restrict manifest projects to ones with a specified
- group
- -p PLATFORM, --platform=PLATFORM
- restrict manifest projects to ones with a
- specifiedplatform group
- [auto|all|none|linux|darwin|...]
- repo Version options:
- --repo-url=URL repo repository location
- --repo-branch=REVISION
- repo branch or revision
- --no-repo-verify do not verify repo source code
- Other options:
- --config-name Always prompt for name/e-mail
repo sync 用-c, --current-branch来指定只抓取特定分支的代码 !
-l, --local-only only update working tree, don't fetch
-n, --network-only fetch only, don't update working tree
-c, --current-branch fetch only current branch from server
- Usage: repo sync [<project>...]
- Options:
- -h, --help show this help message and exit
- -f, --force-broken continue sync even if a project fails to sync
- -l, --local-only only update working tree, don't fetch
- -n, --network-only fetch only, don't update working tree
- -d, --detach detach projects back to manifest revision
- -c, --current-branch fetch only current branch from server
- -q, --quiet be more quiet
- -j JOBS, --jobs=JOBS projects to fetch simultaneously (default 1)
- -m NAME.xml, --manifest-name=NAME.xml
- temporary manifest to use for this sync
- --no-clone-bundle disable use of /clone.bundle on HTTP/HTTPS
- -s, --smart-sync smart sync using manifest from a known good build
- -t SMART_TAG, --smart-tag=SMART_TAG
- smart sync using manifest from a known tag
- -u MANIFEST_SERVER_USERNAME, --manifest-server-username=MANIFEST_SERVER_USERNAME
- username to authenticate with the manifest server
- -p MANIFEST_SERVER_PASSWORD, --manifest-server-password=MANIFEST_SERVER_PASSWORD
- password to authenticate with the manifest server
- repo Version options:
- --no-repo-verify do not verify repo source code