命令
git clone -b 'v2.0' --single-branch --depth 1 https://github.com/git/git.git
- v2.0 代指 branch 或 tag
- depth 表示 clone 深度,如果待克隆的项目很大,同时您不关注代码的变更历史,那可以使用 depth=1 提高 clone 速度
ChenHsingYu
git clone -b 'v2.0' --single-branch --depth 1 https://github.com/git/git.git