Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 621
Rohit Rane Avatar asked Jan 17 '15 16:01

Rohit Rane


2 Answers

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.

like image 141
Senthil A Kumar Avatar answered Nov 12 '22 02:11

Senthil A Kumar


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.

like image 11
VonC Avatar answered Nov 12 '22 02:11

VonC