从远程git存储库获取单个文件内容的最有效机制(关于传输的数据和使用的磁盘空间)是什么?
到目前为止,我已经设法提出:
git clone --no-checkout --depth 1 git@github.com:foo/bar.git && cd bar && git show HEAD:path/to/file.txt
这仍然有点矫枉过正.
如何从回购中获取多个文件?
git git-checkout sparse-checkout git-sparse-checkout
git ×1
git-checkout ×1
git-sparse-checkout ×1
sparse-checkout ×1