threads / discuss / 23877

export one commit id from a repository

Subject: export one commit id from a repository

## tl;dr

3 messages between May 22, 2010 and May 23, 2010.

replies: 2people: 2as markdown or json

Gelonida· May 22, 2010, 13:41 UTC · lore
Hi,
I'm having a bare git repository on a server.

I'd like to be able to concurrently (multiuser) create tar files from certain commmit ids.

How can I do this most efficiently.
How I do this today:
- ssh to the server.
- clone the bare repository to a temp directory.
- checkout a certain version.
- remove the .git directory
- tar it up
- scp it to my local host
- remove the temp directory and the tar file
svn had the command 'export'
Thanks a lot for help or pointing me to existing scripts / tools.
Abhijit Menon-Sen· May 22, 2010, 13:50 UTC · re: Gelonida · lore

Re: export one commit id from a repository

At 2010-05-22 15:41:26 +0200, gelonida@gmail.com wrote:
>
> I'd like to be able to concurrently (multiuser) create tar files from
> certain commmit ids.
git archive --prefix=foo/ $sha1 | gzip > foo.tar.gz
See git-archive(1).
-- ams
Gelonida· May 23, 2010, 10:08 UTC · re: Abhijit Menon-Sen · lore

Re: export one commit id from a repository

Thanks a lot for your answer.
That's what I was looking for :-)
Abhijit Menon-Sen wrote:
Show 9 quoted lines
> At 2010-05-22 15:41:26 +0200, gelonida@gmail.com wrote:
>> I'd like to be able to concurrently (multiuser) create tar files from
>> certain commmit ids.
> 
> git archive --prefix=foo/ $sha1 | gzip > foo.tar.gz
> 
> See git-archive(1).
> 
> -- ams

← back to recent threads