0

I can not git clone a specific repository because it's incredibly slow. All other repositories in my project work perfectly fine (so i guess it's not an ssh issue), but this one can't be downloaded even in 3 hours. I can't run git gc as recommended in other topics (since the repo is not yet here), checked for binary files (none), tried both intellij git plugin and command line and now out of ideas what's wrong. Any help?

Upd. all the repos are in the same place, the size of the slow repo is around 300m, the faster repo is aroun 1,6G. not sure how to calculate objects though.

Trampum
  • 11
  • 1
  • Are all of the other repo's hosted in the same location? Also do you have anyway of verifying the size of the repo? Another developers machine perhaps? – Massey101 Feb 05 '16 at 01:30
  • If you tried `git clone https://repo_path` and didn't work, you can try forking the repo and clone it via GitHub Desktop application. Might work. – Virtua Creative Feb 05 '16 at 01:31
  • Do you have access to the remote? If so maybe a git gc on the remote repository – Dan King Feb 05 '16 at 01:38
  • 1
    You haven't really provided enough information for any of us to answer your question. Where is the git repository hosted? How large is the repository? How many files does it contain? Are you able to clone it *locally* (i.e., not over a network connection)? Does that behave any differently? – larsks Feb 05 '16 at 01:45
  • yeah, no enough information to tell what is wrong, but you can reference to the method mentioned [here](http://stackoverflow.com/questions/4640020/progress-indicator-for-git-clone) to find what happened when doing clone. – gzh Feb 05 '16 at 06:15
  • Massey101, yes, same location. The weirdest thing, the other repos are bigger, but have .git folder 10 times smaller. – Trampum Feb 05 '16 at 09:04
  • larsks, gzh, i updated the post. – Trampum Feb 05 '16 at 09:09
  • larsks, I can't clone it locally, it's overseas – Trampum Feb 05 '16 at 09:10

2 Answers2

0

There is no way to clone a git repo partially, unfortunately. If it has a lot of history, a lot of binaries and is slow due to network speed then you can re-organize the repo but not much you can do on client side.

Tim Hysniu
  • 1,446
  • 13
  • 24
0

Also you can try to create a shallow clone use --depth option, as shown in man page.

--depth

Create a shallow clone with a history truncated to the specified number of revisions. A shallow repository has a number of limitations (you cannot clone or fetch from it, nor push from nor into it), but is adequate if you are only interested in the recent history of a large project with a long history, and would want to send in fixes as patches.

gzh
  • 3,507
  • 2
  • 19
  • 23