{"thread":{"id":"29652","subject":"Git repository clonning","startedAt":"2012-02-17T11:21:46Z","lastAt":"2012-02-17T12:59:00Z","messageCount":2,"participants":["Martin Přecechtěl","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"184875","messageId":"4F3E384A.3040006@gmail.com","threadId":"29652","inReplyTo":null,"subject":"Git repository clonning","fromName":"Martin Přecechtěl","fromEmail":"precechtel@gmail.com","sentAt":"2012-02-17T11:21:46Z","receivedAt":"2012-02-17T11:21:46Z","isPatch":false,"sender":{"key":"precechtel@gmail.com","avatar":null},"body":"To Whom It May Concern,\nI have a problem and I would like to ask you for help. I need to somehow \naccess the git repositry over network and read files from it. In the \nconcrete, only thing I need is to read some files from repository, where \nI have files needed for installation of computers. So on  computer where \ninstallation takes place, I need to read from this repository some files \nneeded for installation process. I tried command git clone \n<my_repository> but this command download the whole repository which \nsize is now almost 8GB files + 4GB .git folder. This process is very \nslow. So I want to ask you if there is a way how to access my repository \n(read some files from it) but to significantly improve speed. Is there \nfor example something what will somehow map the repository to folder and \nthen dowload only thouse files which are accessed?\n\nI would appreciate any help.\n\nThank you for your time,\nYours faithfully,\nMartin Precechtel\n"},{"id":"184880","messageId":"m38vk1sjj4.fsf@localhost.localdomain","threadId":"29652","inReplyTo":"4F3E384A.3040006@gmail.com","subject":"Re: Git repository clonning","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2012-02-17T12:59:00Z","receivedAt":"2012-02-17T12:59:00Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Martin Přecechtěl <precechtel@gmail.com> writes:\n\n> I have a problem and I would like to ask you for help. I need to\n> somehow access the git repository over network and read files from\n> it. In the concrete, only thing I need is to read some files from\n> repository, where I have files needed for installation of\n> computers. So on  computer where installation takes place, I need to\n> read from this repository some files needed for installation\n> process.\n\nWhere this repository is?  Is it on computer you control?  If yes, why\nnot use some networking filesystem or just rsync checked out files?\n\n> I tried command git clone <my_repository> but this command\n> download the whole repository which size is now almost 8GB files + 4GB\n> .git folder. This process is very slow. So I want to ask you if there\n> is a way how to access my repository (read some files from it) but to\n> significantly improve speed. Is there for example something what will\n> somehow map the repository to folder and then dowload only thouse\n> files which are accessed?\n\nYou can try to use shallow clone, which would download only tip of\nhistory... but all the files:\n\n  $ git clone --depth=0 <URL>\n\nIf remote repository is configured correctly, and all the files are\ninside one directory, you can try to use remote archive:\n\n  $ git archive --remote=<URL> --prefix=<dir>/ --output=<dir>.tar \\\n    HEAD:<dir>\n\nIt wouldprobably not work.\n\nIf there is some web interface, like gitweb or GitHub, you can\ndownload snapshots of some subdirectory from there.\n\nHTH\n-- \nJakub Narębski\n"}]}