Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Git equivalent of pg_dumpall?
Date: Fri, 04 Sep 2015 22:32:28
Message-Id: CAGfcS_=L_qwVjHQtaErXnoodVjkJX0Yi9UaBx-eJo7MSX2sn6g@mail.gmail.com
In Reply to: Re: [gentoo-user] Git equivalent of pg_dumpall? by Michael Orlitzky
1 On Fri, Sep 4, 2015 at 1:19 PM, Michael Orlitzky <mjo@g.o> wrote:
2 > On 09/04/2015 01:09 PM, Tanstaafl wrote:
3 >> Similar to the recent thread on cloning...
4 >>
5 >> I don't know and have never even used Git, but I need to get a complete
6 >> and total backup of an entire Git repository to a single file that can
7 >> then be cloned into a new git repo on another system. This was for a
8 >> software project that was being developed by some off-site developers.
9 >>
10 >> What is the proper way to do this? Is it the 'git bundle' command?
11 >>
12 >
13 > The entire git repo is a single .git directory at the top level of your
14 > project. So you can bundle the whole thing with
15 >
16 > tar -cf project.tar /path/to/your/project
17
18 I realize you're using the term "bundle" in the generic sense, but
19 there is a git term called a bundle and it isn't just a tarball of a
20 repository.
21
22 I'd definitely recommend using "git bundle" for this. That is
23 basically what it was designed for, and I'd expect it to be more space
24 efficient since you won't have all the checked-out files. Presumably
25 git will make sure the bundle is packed and garbage-collected as well.
26 You can also perform operations like fetch/clone/etc from a bundle
27 without having to extract it first, which might be useful if you
28 wanted to merge it into another repository. This is pretty-much how
29 we've been moving around git repositories as part of the migration
30 project.
31
32 --
33 Rich

Replies

Subject Author
Re: [gentoo-user] Git equivalent of pg_dumpall? Tanstaafl <tanstaafl@×××××××××××.org>
Re: [gentoo-user] Git equivalent of pg_dumpall? Michael Orlitzky <mjo@g.o>