在项目中有需要拉取诸如tensorflow之类的大型仓库,在拉取时会有一些技巧,具体如下:
方法一:
git config --global core.compression 0
git clone --depth 1 <repo_URI>
# cd to your newly created directory
git fetch --unshallow
git pull --all
方法二:
git clone xxx
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all