Git 仅 Clone 某个分支版本最后文件版本,不下载历史记录。
git clone -b 版本 --depth=1 仓库地址
注:用 `--depth=1` 是限制 clone 的深度,不会下载 Git 的历史记录,这样能加快克隆速度。
示例:
git clone -b v7.1.1 --depth=1 https://github.com/elastic/beats.git
实践案例:
Git 仅 Clone 某个分支版本最后文件版本,不下载历史记录。
git clone -b 版本 --depth=1 仓库地址
注:用 `--depth=1` 是限制 clone 的深度,不会下载 Git 的历史记录,这样能加快克隆速度。
示例:
git clone -b v7.1.1 --depth=1 https://github.com/elastic/beats.git
实践案例: