20

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

Rohit Rane
  • 2,592
  • 5
  • 20
  • 40

4 Answers4

11

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.

Senthil A Kumar
  • 9,038
  • 15
  • 42
  • 55
8

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.

VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
0

you are missing one step here,

after

git clone --depth=1 path

after this cd into your project directory,

cd <intoPartiallyClonedProject>

then,you need to perform git fetch --depth=N, with increasing N like

git fetch --depth=5
git fetch --depth=200
git fetch --depth=500
git fetch --depth=1000

and then perform

this is best explained in detail in this answer,

answer by me i.e NikhilP

error: RPC failed; curl transfer closed with outstanding read data remaining

upvote if it helps you.

NikhilP
  • 1,403
  • 13
  • 22
-4

This message means you have already unshallowed your repository.

cmicat
  • 329
  • 3
  • 5