fatal: early EOF fatal: index-pack failed

后端 未结 30 1812
滥情空心
滥情空心 2020-11-22 10:51

I have googled and found many solutions but none work for me.

I am trying to clone from one machine by connecting to the remote server which is in the LAN network.

30条回答
  •  星月不相逢
    2020-11-22 11:34

    As @ingyhere said:

    Shallow Clone

    First, turn off compression:

    git config --global core.compression 0
    

    Next, let's do a partial clone to truncate the amount of info coming down:

    git clone --depth 1 
    

    When that works, go into the new directory and retrieve the rest of the clone:

    git fetch --unshallow
    

    or, alternately,

    git fetch --depth=2147483647
    

    Now, do a pull:

    git pull --all
    

    Then to solve the problem of your local branch only tracking master

    open your git config file (.git/config) in the editor of your choice

    where it says:

    [remote "origin"]
        url=
        fetch = +refs/heads/master:refs/remotes/origin/master
    

    change the line

    fetch = +refs/heads/master:refs/remotes/origin/master
    

    to

    fetch = +refs/heads/*:refs/remotes/origin/*
    

    Do a git fetch and git will pull all your remote branches now

提交回复
热议问题