From 00532c2ef1f67f28bf0668fdb15e5c495921cc4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=BC=9F=E8=B0=83=E8=B0=83?= <398188662@qq.com> Date: Tue, 28 Mar 2023 13:44:24 +0800 Subject: [PATCH] doc: Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 0e5b579..dca48fc 100644 --- a/README.md +++ b/README.md @@ -1119,6 +1119,12 @@ git pull --recurse-submodules git submodule deinit --all -f # 清理 submodule ``` +```bash +git clone --recurse-submodules --depth=1 --shallow-submodules https://github.com/example/project.git +# --depth 选项限制拉取历史记录的数量,以减少克隆所需的时间和空间 +# --shallow-submodules 则限制子模块拉取的历史记录数量,这两者的结合可以在 Git 项目中只拉取代码 +``` + ### 删除 submodule ```bash