git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git repository clonning

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 17, 2012, 12:59 UTC
Message-ID
<m38vk1sjj4.fsf@localhost.localdomain>
In-Reply-To
<4F3E384A.3040006@gmail.com>
Martin Přecechtěl <precechtel@gmail.com> writes:
Show 7 quoted lines
> I have a problem and I would like to ask you for help. I need to
> somehow access the git repository over network and read files from
> it. In the concrete, only thing I need is to read some files from
> repository, where I have files needed for installation of
> computers. So on  computer where installation takes place, I need to
> read from this repository some files needed for installation
> process.

Where this repository is? Is it on computer you control? If yes, why not use some networking filesystem or just rsync checked out files?

Show 7 quoted lines
> I tried command git clone <my_repository> but this command
> download the whole repository which size is now almost 8GB files + 4GB
> .git folder. This process is very slow. So I want to ask you if there
> is a way how to access my repository (read some files from it) but to
> significantly improve speed. Is there for example something what will
> somehow map the repository to folder and then dowload only thouse
> files which are accessed?

You can try to use shallow clone, which would download only tip of history... but all the files:

  $ git clone --depth=0 <URL>

If remote repository is configured correctly, and all the files are inside one directory, you can try to use remote archive:

  $ git archive --remote=<URL> --prefix=<dir>/ --output=<dir>.tar \
    HEAD:<dir>
It wouldprobably not work.

If there is some web interface, like gitweb or GitHub, you can download snapshots of some subdirectory from there.

HTH
-- 
Jakub Narębski
Previous: Martin Přecechtěl
Message 2 of 2 in “Git repository clonning”
  1. Martin PřecechtělFeb 17, 2012
  2. Jakub NarebskiFeb 17, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.