以linux源码为例, clone完整代码太大, 就指定depth 1
想要指定拉取的版本, 就指定branch v5.4-rc1
- 这里的branch我是在github上的tag中选取的
git clone https://github.com/torvalds/linux.git --branch v5.4-rc1 --depth 1 ./
以linux源码为例, clone完整代码太大, 就指定depth 1
想要指定拉取的版本, 就指定branch v5.4-rc1
git clone https://github.com/torvalds/linux.git --branch v5.4-rc1 --depth 1 ./
本文标题:Git仅拉取指定版本的代码
本文链接:https://www.haomeiwen.com/subject/joyoxdtx.html
网友评论