先进行浅尝clone:
git clone --depth=1 http://xxx.git
depth的参数控制着clone最近多少次的提交。
之后再运行以下三个命令完整拉取代码:
# 拉取完整当前分支
git fetch --unshallow
# 追踪所有远程分支
git remote set-branches origin '*'
# 拉取所有远程分支
git fetch -v
先进行浅尝clone:
git clone --depth=1 http://xxx.git
depth的参数控制着clone最近多少次的提交。
之后再运行以下三个命令完整拉取代码:
# 拉取完整当前分支
git fetch --unshallow
# 追踪所有远程分支
git remote set-branches origin '*'
# 拉取所有远程分支
git fetch -v