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_
配置本地镜像
于 2020-05-15 14:06:25 首次发布
本文介绍了如何创建和使用本地Git镜像以节省时间和空间。通过设置本地镜像,可以减少网络访问,提高代码同步效率,同时节约磁盘空间。详细步骤包括初次创建镜像、后续使用镜像以及如何更新镜像以保持代码库最新。
摘要由CSDN通过智能技术生成