简体   繁体   English

如何从`git`仓库克隆所需的文件夹?

[英]How to clone required folder from `git` repository?

here is my path to images folder in git . 这是我到git images文件夹的路径。 I don't what anything other then images folder from here.. 除了这里的images文件夹,我什么都没有。

Just I would like to clone the images alone using cmd command line. 我只想使用cmd命令行克隆images how to do that? 怎么做?

I tried like this: (i decide to copy in to images folder) 我这样尝试过:(我决定复制到图像文件夹中)

D:\Tutorials\Angular\projects\Pro\slideShow>git clone https://github.com/simpult
on/angular-photo-slider/tree/master/images images
Cloning into 'images'...
fatal: repository 'https://github.com/simpulton/angular-photo-slider/tree/master
/images/' not found 

D:\Tutorials\Angular\projects\Pro\slideShow>

I didn't get any result. 我没有任何结果。 is it possible with git? git有可能吗? any one guide me please? 有人可以引导我吗?

Thanks in advance. 提前致谢。

you cannot clone a specific folder from a git repository you will need to clone the whole thing and delete what you do not want. 您无法从git存储库中克隆特定文件夹,则需要克隆整个内容并删除不需要的内容。

use the regular git command but add the folder name at the end to add the git folder to a specific directory 使用常规的git命令,但在末尾添加文件夹名称以将git文件夹添加到特定目录

git clone github.com/simpulton/angular-photo-slider.git folder-name

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM