关于Git的几篇文章,值得一读

来源:互联网 发布:asp 防sql注入 编辑:程序博客网 时间:2024/05/18 02:48

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 指定的方式重新组织并检出到本地

[cpp] view plaincopy
  1. repo init -h  
  2. Usage: repo init -u url [options]  
  3.   
  4. Options:  
  5.   -h, --help            show this help message and exit  
  6.   
  7.   Logging options:  
  8.     -q, --quiet         be quiet  
  9.   
  10.   Manifest options:  
  11.     -u URL, --manifest-url=URL  
  12.                         manifest repository location  
  13.     -b REVISION, --manifest-branch=REVISION  
  14.                         manifest branch or revision  
  15.     -m NAME.xml, --manifest-name=NAME.xml  
  16.                         initial manifest file  
  17.     --mirror            mirror the forrest  
  18.     --reference=DIR     location of mirror directory  
  19.     --depth=DEPTH       create a shallow clone with given depth; see git clone  
  20.     -g GROUP, --groups=GROUP  
  21.                         restrict manifest projects to ones with a specified  
  22.                         group  
  23.     -p PLATFORM, --platform=PLATFORM  
  24.                         restrict manifest projects to ones with a  
  25.                         specifiedplatform group  
  26.                         [auto|all|none|linux|darwin|...]  
  27.   
  28.   repo Version options:  
  29.     --repo-url=URL      repo repository location  
  30.     --repo-branch=REVISION  
  31.                         repo branch or revision  
  32.     --no-repo-verify    do not verify repo source code  
  33.   
  34.   Other options:  
  35.     --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

[cpp] view plaincopy
  1. Usage: repo sync [<project>...]  
  2.   
  3. Options:  
  4.   -h, --help            show this help message and exit  
  5.   -f, --force-broken    continue sync even if a project fails to sync  
  6.   -l, --local-only      only update working tree, don't fetch  
  7.   -n, --network-only    fetch only, don't update working tree  
  8.   -d, --detach          detach projects back to manifest revision  
  9.   -c, --current-branch  fetch only current branch from server  
  10.   -q, --quiet           be more quiet  
  11.   -j JOBS, --jobs=JOBS  projects to fetch simultaneously (default 1)  
  12.   -m NAME.xml, --manifest-name=NAME.xml  
  13.                         temporary manifest to use for this sync  
  14.   --no-clone-bundle     disable use of /clone.bundle on HTTP/HTTPS  
  15.   -s, --smart-sync      smart sync using manifest from a known good build  
  16.   -t SMART_TAG, --smart-tag=SMART_TAG  
  17.                         smart sync using manifest from a known tag  
  18.   -u MANIFEST_SERVER_USERNAME, --manifest-server-username=MANIFEST_SERVER_USERNAME  
  19.                         username to authenticate with the manifest server  
  20.   -p MANIFEST_SERVER_PASSWORD, --manifest-server-password=MANIFEST_SERVER_PASSWORD  
  21.                         password to authenticate with the manifest server  
  22.   
  23.   repo Version options:  
  24.     --no-repo-verify    do not verify repo source code 
0 0