git fetch --unshallow gives :"fatal: --unshallow on a complete repository does not make sense" error

15,908

Solution 1

I too found the same message. Looks like it's not allowing to unshallow a shallow clone. You might want to try.

git fetch --depth=10000

assuming there are 10000 depths in your clone.

Solution 2

git fetch --depth=10000 remains necessary, but at least you now have a way to confirm your repo is unshallow or not with Git 2.14.x/2.15, Q4 2017.

See commit 417abfd (18 Sep 2017) by Øystein Walle (``).
(Merged by Junio C Hamano -- gitster -- in commit 3430fff, 25 Sep 2017)

rev-parse: rev-parse: add --is-shallow-repository

"git rev-parse" learned "--is-shallow-repository", that is to be used in a way similar to existing "--is-bare-repository" and friends.

Running git fetch --unshallow on a repo that is not in fact shallow produces a fatal error message.
Add a helper to rev-parse that scripters can use to determine whether a repo is shallow or not.

Share:
15,908
Rohit Rane
Author by

Rohit Rane

Updated on June 16, 2022

Comments

  • Rohit Rane
    Rohit Rane almost 2 years

    I am unable to git clone a remote repository using plain

    git clone path 
    

    I get the error "The remote end hung up unexpectedly". The complete msg I get is :

    Cloning into 'xyzabc'...
    remote: Counting objects: 4328, done.
    remote: Compressing objects: 100% (3861/3861), done.
    select: Not enough memory2192/4328), 123.71 MiB | 164.00 KiB/s
    ffatal: The remote end hung up unexpectedly
    atal: early EOF
    fatal: index-pack failed
    

    I search online for a solution and after trying every other solution landed on solution of doing :

    git clone --depth=1 path
    

    followed by

    git fetch --unshallow
    

    Now the clone is completing fully. But, when I try to run git fetch --unshallow to recieve the complete project, I get the error :

    fatal: --unshallow on a complete repository does not make sense
    

    I dont know what to do please guide

  • Matt
    Matt over 5 years
  • Pavel Šimerda
    Pavel Šimerda about 3 years
    This gives me the same error message in the same situation as --unshallow.