Google git-repo (Repo)工具简介

git-repo简称Repo,是基于Git的一款工具,可以管理多个Git库,从而使开发流程的自动化。
repo命令其实是一个Python2脚本(目前不兼容Python3)。
1.安装
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
2.设置访问Git库的参数
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

3.初始化本地库

以Android的master分支初始化:

repo init -u https://android.googlesource.com/platform/manifest
以Android的4.0.1_r1分支初始化:
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
4.下载代码到本地库
repo sync
repo sync a_specific_project another_specific_project
5.上传更新(上传之前先repo sync)
repo upload
6.创建新的分支
repo start branch_name
7.查看库状态
repo branches
repo status
8.查看帮助
repo help

repo help init

参考链接:

https://code.google.com/p/git-repo/
git clone https://gerrit.googlesource.com/git-repo


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值