如何防止git clone |
您所在的位置:网站首页 › PHP获取数据库数据并从大到小列出 › 如何防止git clone |
正如在How do I clone a subdirectory only of a Git repository中所解释的那样?到目前为止,我发现的仅下载Git子目录中所有文件的最佳方法是: git clone --depth 1 --filter=blob:none --sparse \ https://github.com/cirosantilli/test-git-partial-clone-big-small cd test-git-partial-clone-big-small git sparse-checkout set small这是我目前为止只下载small/目录的最好尝试。当我跑的时候: git clone --depth 1 --filter=blob:none --sparse \ https://github.com/cirosantilli/test-git-partial-clone-big-small根目录上的任何文件(但不是目录)都被下载并出现在存储库中,在测试存储库的情况下,我得到了不需要的文件: generate.sh如何防止这种情况发生,只获取我感兴趣的子目录,而不获取任何根目录文件?我已经检查了其他存储库,例如https://github.com/torvalds/linux,在toplevel上有大量的小文件并不会显着减慢下载速度(通过逐个单独下载它们),所以只有在toplevel上有大文件时才会出现问题。在Git 2.37.2、Ubuntu 22.10上测试,2023年2月。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |