试图从 git 下载文件夹.
我试过 wget --no-parent -r http://WEBSITE.com/DIRECTORY
也没有 --no-parent
- 不工作。 curl
对单个文件工作正常,我认为 wget
应该得到文件夹 - 它可以做除此之外的所有事情。
按照建议尝试了许多选项 Using wget to recursively fetch a directory with arbitrary files in it没有工作
最佳答案
你应该试试:git clone <SSH> or <HTTPS>
也许这可以以一种简单的方式帮助您:
DownGit
所以,如果你改为使用 wget
下载一个目录,试试这个。
它会将你的目标目录打包成 .zip
,所以你可以 curl
或 wget
它。
In default, value of fileName and rootDirectory is set to the name of the downloading file or directory. If you do not want to add the directory itself in the zip, then set rootDirectory=false. Like: this link- https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/MinhasKamal/DownGit/tree/master/res/images&rootDirectory=false, will download a file named images.zip; however the root directory- "images", will not be included in the zip.
If you want to download file- https://github.com/MinhasKamal/DownGit/blob/master/res/images/downgit.png with name- DownGitIcon.zip, then the link will be- https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/MinhasKamal/DownGit/blob/master/res/images/downgit.png&fileName=DownGitIcon
顺便说一句,我曾经使用 SVN 通过将 URL 路由到其
trunk
来从 Git 系统下载文件/目录。 .但是非常不方便。
关于github - 从 GitHub 下载目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58397935/