当项目越来越大,拉取代码越来越慢,一直卡在一个地方
为了加快开发进度和办公效率,这时就可以使用 --depth==1
git clone 仓库地址 --depth=1
git clone --depth==1 仓库地址
这样拉取只会拉取最近的提交,log也只有最近的几条
分支也是默认的分支,所以需要拉取git上的分支
git remote set-branches origin '分支'
git fetch --depth 1 origin 分支
这样就可以了:
在切换分支
git checkout dev