From 008d81739435bd7d2720d2c3d7075185fae62e8b Mon Sep 17 00:00:00 2001 From: wangyueliang Date: Wed, 24 Jul 2024 11:27:39 +0800 Subject: [PATCH] docs: add tips on reducing git clone pull size --- README.en.md | 9 ++++++++- README.md | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.en.md b/README.en.md index 7edafcdf..6b102287 100644 --- a/README.en.md +++ b/README.en.md @@ -9,11 +9,18 @@ `nestos-assembler` can be simply understood as a container environment that can build nestos. This environment integrates some scripts, RPM packages and tools required to build NestOS. +### Clone repository notes +Due to the drastic changes in the Nestos-assembler code and the large number of historical commit records, when cloning this repository, it is recommended to use the following command to reduce the size of the code directory and improve the fetch speed: +``` +git clone --depth=1 --single-branch https://gitee.com/openeuler/nestos-assembler.git +``` +Adding the parameters means to download only the most recent commit of a single branch. + ### Usage #### Build Container image ``` -git clone https://gitee.com/openeuler/nestos-assembler.git +git clone --depth=1 --single-branch https://gitee.com/openeuler/nestos-assembler.git cd nestos-assembler/ docker build -f Dockerfile . -t nestos-assembler:your_tag ``` diff --git a/README.md b/README.md index cea20d33..ffe49108 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,18 @@ nestos-assembler是一个构建环境,该环境包含一系列工具,可用 nestos-assembler可以简单理解为是一个可以构建NestOS的容器环境,该环境集成了构建NestOS所需的一些脚本、rpm包和工具。 +### 克隆仓库说明 +因nestos-assembler代码变化较为剧烈,历史提交记录过多,克隆该仓库时建议使用如下命令,降低代码目录体积,提高拉取速率: +``` +git clone --depth=1 --single-branch https://gitee.com/openeuler/nestos-assembler.git +``` +添加参数含义为仅下载单独分支的最新1条提交记录 + ### 使用方法 #### 容器镜像构建 ``` -git clone https://gitee.com/openeuler/nestos-assembler.git +git clone --depth=1 --single-branch https://gitee.com/openeuler/nestos-assembler.git cd nestos-assembler/ docker build -f Dockerfile . -t nestos-assembler:your_tag ``` -- Gitee