0

There is a huge ( over 500 Mbs ) existing repository hosted on bitbucket.org. For some reason, when I try to clone it to my local environment, it takes forever, even one day is not enough (more than 24 hours). However I can download it as a zip archive very fast. But after downloading, it needs to link or bind code to existing bitbucket repository. I'm not sure if it's possible, please share your thoughts. Any help is much appreciated.

1 Answers1

1

Maybe try cloning only the latest revision?

git clone --depth=1 <remote name>

If that still works very slow I would try to unzip archive, create new repo, then set remote

git remote add origin <remote name>

then git fetch to get refs (guess it will work slowly so set --depth), create local branch and set upstream to origin/master.

Ellaylone
  • 34
  • 5
  • when I used git clone --depth=1 along with -single-branch param it worked like a charm! git clone --depth 1 'remote repo' -b 'branch name' --single-branch. Similar solution to this one http://stackoverflow.com/questions/4811434/clone-only-one-branch, but the --depth=1 should also be specified to optimize amount of data to load. – Semen Shekhovtsov Jan 06 '17 at 14:20