如何处理过往提交过多的情况 FanetheDivine 2026-03-31 0 阅读1分钟 在仓库比较老的情况下 可能有很多commit 下载起来特别慢 用这个命令可以解决 git clone xxx --depth 20 --no-single-branch --depth 20的意思是 只克隆最近20个commit --no-single-branch则是因为 --depth会默认只复制一个分支 后续可以正常git fetch 不需要加--depth 也可以正常push