Mac 安装repo与使用介绍

2 篇文章 0 订阅
2 篇文章 0 订阅

repo 安装

Windows 安装

1. 安装Python3,过程中一定要勾选将Python加入到Windows环境变量中;
2. 使用git clone,将https://mirrors.tuna.tsinghua.edu.cn/git/git-repo克隆至本地任意目录;
3.2中克隆完成的git-repo目录,找到repo文件
4.3中的repo添加到Windows的环境变量中
5. 打开3中的repo,找到REPO_URL,将“=”号后面的地址替换为https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
6. 使用repo init命令初始化我们的git目录
7. init成功后,使用repo sync命令,同步最新代码

使用repo

1 初始化repo仓库

需要切换为自己的名字的地址

例 repo init -u ssh://ma.jianjun@10.170.133.161:29418/IVI23/manifest.git -m manifest.xml


repo init -u ssh://xxx@10.170.133.161:29418/IVI23/manifest.git -m manifest.xml
2 同步代码
repo sync
3 为所有git仓库拉取远端origin/dev并创建本地dev分支
repo start --all dev

Mac 安装

1. 创建repo脚本存放路径,并配置环境变量

mkdir ~/bin
PATH=~/bin:$PATH

2. 下载 Repo 工具,并确保它可执行:

curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

上面是Google的repo文档,由于在墙外,所以请使用下面清华大学提供的repo


# 清华大学repo
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo

#修改repo权限,可以用 ‘ll ~/bin/repo’ 命令查看
chmod a+x ~/bin/repo

3. 配置repo

3.1 设置manifest.xml文件
    <?xml version="1.0" encoding="UTF-8" ?>
<manifest>
    <remote
        name="origin"
        fetch="http://admin@172.16.29.213:7070/r/xxx"
        revision="dev"
      />
    <default
       remote="origin"
       revision="dev"
       sync-j="4"
       sync-c="true"
    />
     
    <project name="IVI23_Launcher" path="xxx" />
    
</manifest>

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Army_Ma

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值