2

Due to some server issues resulting into the error: "aborting due to possible repository corruption on the remote side.", I am not able to clone the repo. As per online research, I found that my server does not have enough RAM to process heavy memory usage. The repo size is 400mb.

Although, I have downloaded the code by clicking the latest commit > Browse code > Download as zip.

Is there a way to init this downloaded folder as git repo? So, that I can push the code?

nr5
  • 4,228
  • 8
  • 42
  • 82

1 Answers1

4

You can use these commands

cd folder
git init
git remote add origin https://github.com/user/repo.git
utkusonmez
  • 1,486
  • 15
  • 22
  • I tried this earlier too. It initialises the folder as git but when I do a "git fetch". I see the same error again: remote: `Counting objects: 36548, done. remote: warning: suboptimal pack - out of memory error: pack-objects died of signal 937/17112) error: git upload-pack: git-pack-objects died with error. fatal: git upload-pack: aborting due to possible repository corruption on the remote side. remote: aborting due to possible repository corruption on the remote side. fatal: protocol error: bad pack header NipunR-Pax:helix.git Nipun$ git branch` – nr5 Apr 03 '17 at 07:26
  • I need a way where I just need to add remote origin to the downloaded branch and just push my code. Server does not have enough memory to pull the code. – nr5 Apr 03 '17 at 07:28
  • Can you check this http://stackoverflow.com/questions/9040083/error-when-pulling-warning-suboptimal-pack-out-of-memory ? – utkusonmez Apr 03 '17 at 10:12