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

Re: FR: Clone just the desired subdirectory

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Jun 25, 2010, 20:27 UTC
Message-ID
<20100625202738.GA3696@atjola.homenet>
In-Reply-To
<AANLkTilyvCWyWzqPGxtg9tkRM5SjXxbt50P5zImlxCHD@mail.gmail.com>
On 2010.06.25 16:24:52 +0200, Laszlo Papp wrote:
> Is there a way to clone
> git://git.openembedded.org/openembedded/recipes/qt4, not the whole
> repository ?
Here you ask for a subdirectory clone.
Show 5 quoted lines
> My friend asked it from me, but I couldn't advise anything to him, but
> this request does make sense by me. So he would like to download a
> part of a git repository and he is not interested in the index and the
> history, so it would be nice to have something like git archive
> --remote or similar command which can do this operation.

Here you say that your friend doesn't bother about the history, but just wants a snapshot.

So which functionality are you actually asking for? The latter can already be handled by git archive:

git archive --remote=<repo> <tree-ish>
For example:
git archive --remote=git://localhost/some/repo.git HEAD:some/directory

git-daemon just doesn't allow it by default, you need to enable the upload-archive service.

Björn
Previous: Sverre Rabbelier
Message 3 of 3 in “FR: Clone just the desired subdirectory”
  1. Laszlo PappJun 25, 2010
  2. Sverre RabbelierJun 25, 2010
  3. Björn SteinbrinkJun 25, 2010

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.