repo start
revision 指定项目从仓库的哪个branch 下载, project中未配置时,以manifest中的default中的revision为准
<project path= name= revision="master" />
include 包含别一个xml到当前xml中
<include name="other.xml" />
remove-project 把之前配置在xml里的project移除
<remove-project name="" path="" />
repo forall -c // 遍历所有的git仓库,并在每个仓库执行-c所指定的命令
.repo/repo/subcmds 的forall.py: setenv 中定义了一些repo forall中可以使用的变量
repo forall -c 'echo $REPO_PATH'
repo 服务器端创建分支,基于当前代码
repo forall -c "git push <origin> HEAD:<new branch>"
repo 服务器端删分支
repo forall -c "git push -r -d <remote origin>/<branch name>"
或
repo forall -c "git push <origin> :<branch name>"
生成快照
repo manifest -r -o snapshot.xml
恢复一个快照,可以用下面的命令
cp snapshot.xml .repo/manifests/
repo init -m snapshot.xml
repo sync -d
如果启用了ssh的config中的别名,应写为
repo init -u ssh://SSH_NAME/git_path //SSH_NAME后不带冒号
以下写法中path不能以/开头
repo init -u SSH_NAME:~/git_path //我猜,如果git_path以/开头时 :/会被错误解析