使用 git clone --depth 1, 可以只clone最后一次commit ,也只有一个master分支,如果这时还想切换到其它分支如何操作呢?
git remote set-branches origin 'remote_branch'
git fetch --depth 1 origin remote_branch
git checkout remote_branch
使用 git clone --depth 1, 可以只clone最后一次commit ,也只有一个master分支,如果这时还想切换到其它分支如何操作呢?
git remote set-branches origin 'remote_branch'
git fetch --depth 1 origin remote_branch
git checkout remote_branch