博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
repo
阅读量:4181 次
发布时间:2019-05-26

本文共 1089 字,大约阅读时间需要 3 分钟。

1:不同的项目通过repo init 来创建和切换 ,参数就是新项目的 manifest

每个manifest 包括 新项目目录结构, 包含的仓库, 每个仓库的版本号。

repo init: 只是从manifest.git中加载新的manifest.

repo init -b: 是从当前的manifest.git 切到一个新的manifest branch上

repo sync: 会根据新的manifest,从server中下载git数据到./repo/projects, 并根据版本号信息,将code checkout 到本地工作目录。

One useful tip

  If the git repositories have been already downloaded by repo, you can change the branch of all projects by the following commands  in the local directory:

    repo sync

    repo init –b new_branch_name

    repo forall -c 'git fetch --all'

    repo forall –c ‘git reset --hard revision’   #the revision is the value of the Attribute ‘revision’ in the file .repo/manifest.xml

    repo sync

  So you don’t need to get another copy of all projects.

2:一个项目所有的 仓库的数据 都保存在 .repo/ 目录下, 具体在 .repo /projects/*.git .   

其实你在工作目录下,例如kernel目录下的.git 目录,都是重定向到这个 .repo/project/下的,所以说只要这个目录不丢, 你的这个项目的所有数据就不丢。

3: 不同项目, 如果都有同一个目录, 比如:msm项目有 ./external,   clovertrail 项目也有./external, 那么这2个项目是可以共享同一个server上的库的,

所以你在通过repo init 切换之后, 在sync之后,.external.git 包含了2个项目的数据,和各个项目的branch。包括之前msn在本地新建的branch。

???

是在repo init之后 ,还是之前,就具备了2个项目的的所有branch 信息? 

转载地址:http://qphai.baihongyu.com/

你可能感兴趣的文章
Hibernate的乐观锁并发控制机制
查看>>
Hibernate的悲观锁并发控制机制及LockMode
查看>>
Hibernate中的数据的获取策略(fetching)
查看>>
Hibernate中通过HQL/JPQL查询的方式实现动态数据获取
查看>>
Hibernate中通过FetchProfile的方式实现动态数据获取
查看>>
Hibernate应用中通过JPA配置Entity缓存
查看>>
Hibernate中配置二级缓存的并发策略
查看>>
Hibernate中的Query cache(查询缓存)
查看>>
Hibernate的interceptors与events
查看>>
Android常用代码
查看>>
Cardboard虚拟现实开发初步(二)
查看>>
60个优秀的免费3D模型下载网站
查看>>
Cardboard虚拟现实开发初步(三)
查看>>
Android native和h5混合开发几种常见的hybrid通信方式
查看>>
Vista/Win7 UAC兼容程序开发指南
查看>>
IOS程序开发框架
查看>>
安装jdk的步骤
查看>>
简述JAVA运算符
查看>>
简易ATM源代码及运行结果
查看>>
简述Java中的简单循环
查看>>