Reputation: 7918
I am trying to download the GCC Git repo and it is taking too much time due to download due to limited speed available. I Just want to know that is it possible to download the repo in parts.
I have read many articles and questions relating to download single folder or part of repo specifically. But didn't find any article or question for downloading repo in parts. So, that I have all the commits available to me and Git on the same time can be update future commits.
Upvotes: 0
Views: 373
Reputation: 60255
Easiest might be to fire up an ec2 instance, clone the repo there and serve that with rsync. Even if you've used your free-micro-instance year a demand micro instance is $0.05/hr, its baseline 8GB disk is $0.88/mo and the traffic would probably fit in the free GB ($0.12/GB outbound after that). Even if it took you a week to fetch that wouldn't add up to ten bucks.
Upvotes: 0
Reputation: 176
You can try to download a truncated history with the --depth option:
--depth <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.
If you just want the files, do:
git clone --depth 1 <repo>
Upvotes: 3
Reputation: 15560
If you read How to complete a git clone for a big project on an unstable connection? you'll see it's not really possible right now. They propose a couple of workarounds, but there's no warranty.
But, provided GCC has a SVN repository, you can use git-svn
as explained here to fetch SVN's content commit by commit:
$ git svn -s clone svn://gcc.gnu.org/svn/gcc
Initialized empty Git repository in /home/desert69/gcc/.git/
r1 = b0439281e5f21d7567489ac582f45adfb813d332 (refs/remotes/trunk)
A gcc/config/m68k/xm-3b1.h
r2 = b24dd970fa8d03c1df555c4d771fa3dee00918de (refs/remotes/trunk)
A gcc/typeclass.h
r3 = 81e937b24b79225c9a61890f72737eba914dde22 (refs/remotes/trunk)
A gcc/config/m68k/x-apollo68
r4 = 0d9f9c476899983566408ee3698f097fa9d4ef5a (refs/remotes/trunk)
^C
$ cd gcc/
$ git svn fetch
A gcc/config/pyr/x-pyr
r5 = ff3c8016a7b2261c8df6c2564e76ad164b5a1a4a (refs/remotes/trunk)
A gcc/config/m68k/xm-crds.h
r6 = ff54129791033b73ffa49d12ec7802ca9b3010ea (refs/remotes/trunk)
(... goes on ...)
Sad to say svn
makes it easier than git
, but, well, that's it.
Upvotes: 1