从github下载单个文件夹

时间:2019-06-09 11:54:36

标签: git github

我想从git存储库下载/克隆单个文件夹。我的GitHub存储库包含多个文件夹。 我正在使用以下代码,但出现错误。 请指导我:

mkdir <repo>
cd <repo>
git init
git remote add -f origin <url>

git config core.sparseCheckout true

echo "some/dir/" >> .git/info/sparse-checkout
echo "another/sub/tree" >> .git/info/sparse-checkout

git pull origin master

错误:

要求:https://github.com/gitcloneproje/rdbms-lib/tree/master/postgres-service/info/refs?service=git-upload-pack

重定向:https://fedsvc.com/ofis/public/ErrorBookmark.aspx?ID=0000

0 个答案:

没有答案