美文网首页
source tree Git fatal: pack has

source tree Git fatal: pack has

作者: frola_ | 来源:发表于2018-09-27 19:32 被阅读0次

    终端输入,之后拉取其他分支

    git clone --depth=1
    

    当项目过大时,git clone会出现超时失败,这时候我们可以只拉去最新的一次或者几次commit:

    git clone --depth=1 xxxxxx
    

    有时候,我们总是图一时之快,而忽略了其他的问题。

    你可能很快会发现,拉下来的只是默认的分支,而要想拉取其他分支代码的时候,一脸懵逼,有木有??

    其实也很简单:

    $ git remote set-branches origin 'remote_branch_name'
    $ git fetch --depth 1 origin remote_branch_name
    $ git checkout remote_branch_name
    

    相关文章

      网友评论

          本文标题:source tree Git fatal: pack has

          本文链接:https://www.haomeiwen.com/subject/nakfgftx.html