配置本地镜像

本文介绍了如何创建和使用本地Git镜像以节省时间和空间。通过设置本地镜像,可以减少网络访问,提高代码同步效率,同时节约磁盘空间。详细步骤包括初次创建镜像、后续使用镜像以及如何更新镜像以保持代码库最新。
摘要由CSDN通过智能技术生成

Use mirror to save time and space
Why use mirror:
When using several clients, it is better to create a local mirror, and to sync code from that mirror (which requires less network access and save space/download time).

Setp1: Create mirror (only need to setup one time)
$mkdir  ~/repo_mirror   /*create mirror folder , only need to setup one time for you local environment for all branch*/
$cd ~/repo_mirror
$repo init -u http://git01.mediatek.com/alps_release/platform/manifest -b <customer> -m <manifest>  --mirror  /* choose one branch as mirror*/
e.g. $repo init -u http://git01.mediatek.com/alps_release/platform/manifest -b mtk -m alps-release-n1.mp5-default.xml --mirror
$repo sync -f -j8 --prune
Step2: Use mirror
$mkdir ~/a_branch_codebase & cd ~/ a_branch_codebase
$repo init -u http://git01.mediatek.com/alps_release/platform/manifest -b <customer> -m <manifest>  --reference=~/repo_

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值