下载仓库中指定分支下的指定目录
以 https://github.com/spring-projects/spring-boot.git
仓库的 2.5.x
分支为例, url 地址为: https://codeload.github.com/spring-projects/spring-boot/tar.gz/分支名
, 要下载的目录为: spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin
, 因此指定解压目录为: 项目名-分支名/目录路径
, --strip-components
指定要下载的目录层级
curl https://codeload.github.com/spring-projects/spring-boot/tar.gz/2.5.x | tar -zx spring-boot-2.5.x/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin --strip-components=3
标签:Github,tar,spring,boot,https,目录,2.5
From: https://www.cnblogs.com/xtyuns/p/16633288.html