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

Re: Exporting a tree from a repository

From
Ciprian Dorin Craciun <ciprian.craciun@gmail.com>
Date
Jul 15, 2007, 07:12 UTC
Message-ID
<8e04b5820707150012r13c5db69g96b97d910dc1b137@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.64.0707142237190.13310@beast.quantumfyre.co.uk>
On 7/15/07, Julian Phillips <julian@quantumfyre.co.uk> wrote:
Show 34 quoted lines
> On Sat, 14 Jul 2007, Ciprian Dorin Craciun wrote:
>
> >   Hello all!
> >
> >   I am a new GIT user, I like it, so I started playing with it for
> > different projects I work on.
> >
> >   Currently I am playing with "Linux from Scratch", and I have
> > written some scripts to automatize the build process -- kind of
> > install scripts...
> >
> >   For this I use GIT to store all the source packages -- each inside
> > it's own branch :).
> >
> >   My question is the following: How can I export an entire tree
> > without using a working directory, or cloning the repository. (Because
> > from what I have seen so far there is no way to use the same
> > repository with many working directories...)
>
> You can have as many working directories as you want from one repository
> using the git-new-workdir script from contrib/workdir.  You do need to be
> careful when updating references though (you basically want to avoid
> updating a reference that you are using in another working directory).
>
> You should also be able to use this to get an "export" - simply create the
> new workdir and then remove the .git (being careful not to accidentally do
> this in your actual repository).  However I expect there is a better way
> to do this ...
>
> --
> Julian
>
>   ---
> Quark!  Quark!  Beware the quantum duck!
    Thank you for the hint about git-new-workdir! I will try it.
    Now for the export thing... I know that I can just clone the
remote repository and then remove the .git folder, but for my purpose
I just want to have the HEAD tree downloaded, without any history...
And by using git clone I end up downloading much more than I actually
need.
    I am looking for a feature like 'svn export <repo+tree_path>
<destination_path>'...
    Ciprian.
Previous: Junio C HamanoNext: Alex Riesen
Message 4 of 6 in “Exporting a tree from a repository”
  1. Ciprian Dorin CraciunJul 14, 2007
  2. Julian PhillipsJul 14, 2007
  3. Junio C HamanoJul 15, 2007
  4. Ciprian Dorin CraciunJul 15, 2007
  5. Alex RiesenJul 15, 2007
  6. martin f krafftJul 15, 2007

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.