0


Git Bash 下载

克隆GitHub上的指定文件夹

想要下载的文件夹URL为

https://github.com/WZMIAOMIAO/deep-learning-for-image-processing/tree/master/pytorch_segmentation/fcn

在Git Bash中,使用cd命令导航到想要保存文件夹的目录。例如,如果要保存在用户文件夹中,可以运行以下命令:

cd ~

运行以下命令来部分克隆(partial clone)指定文件夹:

git clone--filter=blob:none --depth=1<repository_url>--branch <branch_name>--sparse

将<repository_url>替换为你复制的URL,并将<branch_name>替换为代码库的分支名称。例

git clone --filter=blob:none --depth=1 https://github.com/WZMIAOMIAO/deep-learning-for-image-processing.git --branch master --sparse

进入克隆下来的代码库目录:

cd deep-learning-for-image-processing

使用git sparse-checkout set 命令指定要部分克隆的文件夹。

git sparse-checkout set pytorch_segmentation/fcn

使用git pull命令拉取代码库的更新:

git pull origin master

现在,已成功下载并部分克隆了指定的文件夹。

标签: git

本文转载自: https://blog.csdn.net/weixin_45928125/article/details/131640832
版权归原作者 CV_Journey 所有, 如有侵权,请联系我们删除。

“Git Bash 下载”的评论:

还没有评论