稀疏结帐和浅克隆
Sparse checkout and shallow clone
当我尝试将库添加到 CDN 时,它说我需要 稀疏结帐和浅层克隆 才能轻松进行 PR。那么那些是什么?看了一些文章,没看懂。
cndjs doc points to documents/sparseCheckout.md
涉及:
git config core.sparseCheckout true
# edit .git/info/sparse-checkout
# and
git pull origin master --depth 10
这允许您限制处理该大型存储库所需的数据:
Currently, cdnjs's repo is too huge and some people have issues with using it when it is this big.
To get around the issue or repo size you can use sparse-checkout. It lets you check out only the files you want, so that the whole directory in your computer won't need to be 11GB, but only about 1GB (you can make this even smaller with shallow pull too!)
2020 年 1 月更新,4 年后:
您需要使用 Git 2.25 git sparse-checkout
命令。
当我尝试将库添加到 CDN 时,它说我需要 稀疏结帐和浅层克隆 才能轻松进行 PR。那么那些是什么?看了一些文章,没看懂。
cndjs doc points to documents/sparseCheckout.md
涉及:
git config core.sparseCheckout true
# edit .git/info/sparse-checkout
# and
git pull origin master --depth 10
这允许您限制处理该大型存储库所需的数据:
Currently, cdnjs's repo is too huge and some people have issues with using it when it is this big.
To get around the issue or repo size you can use sparse-checkout. It lets you check out only the files you want, so that the whole directory in your computer won't need to be 11GB, but only about 1GB (you can make this even smaller with shallow pull too!)
2020 年 1 月更新,4 年后:
您需要使用 Git 2.25 git sparse-checkout
命令。