# exporting a .git file ?

8 messages from 2012-08-27 to 2012-08-27. Participants: Aaron Gray, Mihamina Rakotomandimby, Dan Johnson, Konstantin Khomoutov, Andreas Schwab, Michael Haggerty.
Thread: https://gitlist.dev/t/31364

## Aaron Gray, 2012-08-27 14:32

Subject: exporting a .git file ?
Message-ID: <CANkmNDc7VP4QiocxuB7JMuQyZy5nDT=ertow_ib2Hri_=XRMOA@mail.gmail.com>
URL: https://gitlist.dev/e/CANkmNDc7VP4QiocxuB7JMuQyZy5nDT%3Dertow_ib2Hri_%3DXRMOA%40mail.gmail.com

```
Hi,

Is there anyway to get my git repository as a single file ?

Many thanks in advance,

Aaron

```

## Mihamina Rakotomandimby, 2012-08-27 14:35

Subject: Re: exporting a .git file ?
Message-ID: <503B8597.8040701@rktmb.org>
URL: https://gitlist.dev/e/503B8597.8040701%40rktmb.org
In-Reply-To: <CANkmNDc7VP4QiocxuB7JMuQyZy5nDT=ertow_ib2Hri_=XRMOA@mail.gmail.com>

```
On 08/27/2012 05:32 PM, Aaron Gray wrote:
> Is there anyway to get my git repository as a single file ?

What is the purpose?
".git/" is a folder...

-- 
RMA.

```

## Aaron Gray, 2012-08-27 14:39

Subject: Re: exporting a .git file ?
Message-ID: <CANkmNDd6zPkrL-TueLnGCCyqP6eetxWh5KkL4vLGgUUddZFNhw@mail.gmail.com>
URL: https://gitlist.dev/e/CANkmNDd6zPkrL-TueLnGCCyqP6eetxWh5KkL4vLGgUUddZFNhw%40mail.gmail.com
In-Reply-To: <503B8597.8040701@rktmb.org>

```
On 27 August 2012 15:35, Mihamina Rakotomandimby <mihamina@rktmb.org> wrote:
> On 08/27/2012 05:32 PM, Aaron Gray wrote:
>>
>> Is there anyway to get my git repository as a single file ?
>
>
> What is the purpose?
> ".git/" is a folder...

I realize that but I wanted to distribute it as a downloadable file
without having to use a server.

Aaron

```

## Dan Johnson, 2012-08-27 14:45

Subject: Re: exporting a .git file ?
Message-ID: <CAPBPrnu1FNbWP+k6Nq5NudBFYZu9njjbcL+oL7m-z5sajuXpBg@mail.gmail.com>
URL: https://gitlist.dev/e/CAPBPrnu1FNbWP%2Bk6Nq5NudBFYZu9njjbcL%2BoL7m-z5sajuXpBg%40mail.gmail.com
In-Reply-To: <CANkmNDc7VP4QiocxuB7JMuQyZy5nDT=ertow_ib2Hri_=XRMOA@mail.gmail.com>

```
On Mon, Aug 27, 2012 at 10:32 AM, Aaron Gray <aaronngray.lists@gmail.com> wrote:
> Hi,
>
> Is there anyway to get my git repository as a single file ?

You're probably looking for the git bundle command (see git bundle
--help), but it's possible you might just want to use tar.

Hope that helps,
-- 
-Dan

```

## Aaron Gray, 2012-08-27 14:48

Subject: Re: exporting a .git file ?
Message-ID: <CANkmNDe10dtgtJ2sTJvS_75iY3v75_GCh219+dEOYGBurLaT2g@mail.gmail.com>
URL: https://gitlist.dev/e/CANkmNDe10dtgtJ2sTJvS_75iY3v75_GCh219%2BdEOYGBurLaT2g%40mail.gmail.com
In-Reply-To: <CAPBPrnu1FNbWP+k6Nq5NudBFYZu9njjbcL+oL7m-z5sajuXpBg@mail.gmail.com>

```
On 27 August 2012 15:45, Dan Johnson <computerdruid@gmail.com> wrote:
> On Mon, Aug 27, 2012 at 10:32 AM, Aaron Gray <aaronngray.lists@gmail.com> wrote:
>> Hi,
>>
>> Is there anyway to get my git repository as a single file ?
>
> You're probably looking for the git bundle command (see git bundle
> --help), but it's possible you might just want to use tar.
>
> Hope that helps,

Great thanks Dan, comes in under 2 megs, thats great.

Aaron

```

## Konstantin Khomoutov, 2012-08-27 14:53

Subject: Re: exporting a .git file ?
Message-ID: <20120827185316.a18222bf90216d87dea9f23a@domain007.com>
URL: https://gitlist.dev/e/20120827185316.a18222bf90216d87dea9f23a%40domain007.com
In-Reply-To: <CANkmNDc7VP4QiocxuB7JMuQyZy5nDT=ertow_ib2Hri_=XRMOA@mail.gmail.com>

```
On Mon, 27 Aug 2012 15:32:40 +0100
Aaron Gray <aaronngray.lists@gmail.com> wrote:

> Is there anyway to get my git repository as a single file ?
Depends on what you really need.

If you need to export the repository *history* of one or more
references (branches or tags), use `git bundle` to create a
specially-formatted file which can be imported using Git on another
machine.

If you need to just export the snapshot of the files maintained in the
repository at the specified commit, use `git export`.

```

## Andreas Schwab, 2012-08-27 15:09

Subject: Re: exporting a .git file ?
Message-ID: <m2r4qsbcdi.fsf@igel.home>
URL: https://gitlist.dev/e/m2r4qsbcdi.fsf%40igel.home
In-Reply-To: <CANkmNDd6zPkrL-TueLnGCCyqP6eetxWh5KkL4vLGgUUddZFNhw@mail.gmail.com>

```
Aaron Gray <aaronngray.lists@gmail.com> writes:

> I realize that but I wanted to distribute it as a downloadable file
> without having to use a server.

git bundle can create a single file from the object database.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

```

## Michael Haggerty, 2012-08-27 15:40

Subject: Re: exporting a .git file ?
Message-ID: <503B94E1.5010803@alum.mit.edu>
URL: https://gitlist.dev/e/503B94E1.5010803%40alum.mit.edu
In-Reply-To: <CAPBPrnu1FNbWP+k6Nq5NudBFYZu9njjbcL+oL7m-z5sajuXpBg@mail.gmail.com>

```
On 08/27/2012 04:45 PM, Dan Johnson wrote:
> On Mon, Aug 27, 2012 at 10:32 AM, Aaron Gray <aaronngray.lists@gmail.com> wrote:
>> Hi,
>>
>> Is there anyway to get my git repository as a single file ?
> 
> You're probably looking for the git bundle command (see git bundle
> --help), but it's possible you might just want to use tar.

Please note that a "git bundle" will contain the contents of the
repository (commits, log messages, etc) but not the local configuration
like .git/config, .git/info/*, nor some other information like the
reflogs (history of old values of references).  This is probably what
you want.

A "tar" of the .git directory, by contrast, would include this local
information unless you exclude it explicitly.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/

```
