在我的情况下,这些答案都没有帮助。如果你是为Windows开发的,你可能没有svn。在许多情况下,你不能指望用户安装Git,或者出于其他原因不想下载整个存储库。回答这个问题的一些人,比如Willem van Ketwich和aztack,制作了完成这项任务的工具。但是,如果该工具不是为您使用的语言编写的,或者您不想安装第三方库,这些都不起作用。
usage: gitd [-h] [-u URL] [-r] [-p] [--proxy PROXY]
optional arguments:-h, --help show this help message and exit-u URL, --url URL github url, split by ",", example: "https://x, http://y"-r, --raw download from raw url-p, --parse download by parsing html--proxy PROXY proxy config, example "socks5://127.0.0.1:7891"
Example:1. download by raw url: gitd -u "https://github.com/twfb/git-directory-download"2. download by raw url: gitd -r -u "https://github.com/twfb/git-directory-download"3. dowmload by parsing: gitd -p -u "https://github.com/twfb/git-directory-download"4. download by raw url with proxy: gitd -r -u "https://github.com/twfb/git-directory-download" --proxy "socks5://127.0.0.1:7891"