# File archiver using git

4 messages from 2006-08-27 to 2006-08-28. Participants: Matt McCutchen, Grzegorz Kulewski, Jakub Narebski.
Thread: https://gitlist.dev/t/5407

## Matt McCutchen, 2006-08-27 13:10

Subject: File archiver using git
Message-ID: <3bbc18d20608270610o102968d2kd340d40843262dc5@mail.gmail.com>
URL: https://gitlist.dev/e/3bbc18d20608270610o102968d2kd340d40843262dc5%40mail.gmail.com

```
Dear git people,

You might like the two attached scripts that I wrote around git to
pack file trees containing lots of redundancy into very small
packages.  For example, if I have ten slightly different versions of a
piece of software because I didn't use version control, I can use
gitar to compress them together.

Matt

```

## Grzegorz Kulewski, 2006-08-27 13:31

Subject: Re: File archiver using git
Message-ID: <Pine.LNX.4.63.0608271528130.8018@alpha.polcom.net>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0608271528130.8018%40alpha.polcom.net
In-Reply-To: <3bbc18d20608270610o102968d2kd340d40843262dc5@mail.gmail.com>

```
On Sun, 27 Aug 2006, Matt McCutchen wrote:
> Dear git people,
>
> You might like the two attached scripts that I wrote around git to
> pack file trees containing lots of redundancy into very small
> packages.  For example, if I have ten slightly different versions of a
> piece of software because I didn't use version control, I can use
> gitar to compress them together.

Does it (and GIT in general) work ok with file permisions, ownership, soft 
and hard links, named sockets, device files and similar "strange" 
filesystem objects? Do I need any options to GIT to make it work with 
them?

Can I for example securely backup or even version-control /etc directory?


Grzegorz Kulewski

```

## Jakub Narebski, 2006-08-27 15:34

Subject: Re: File archiver using git
Message-ID: <ecse17$2q3$1@sea.gmane.org>
URL: https://gitlist.dev/e/ecse17%242q3%241%40sea.gmane.org
In-Reply-To: <Pine.LNX.4.63.0608271528130.8018@alpha.polcom.net>

```
Grzegorz Kulewski wrote:

> On Sun, 27 Aug 2006, Matt McCutchen wrote:
>> Dear git people,
>>
>> You might like the two attached scripts that I wrote around git to
>> pack file trees containing lots of redundancy into very small
>> packages.  For example, if I have ten slightly different versions of a
>> piece of software because I didn't use version control, I can use
>> gitar to compress them together.
> 
> Does it (and GIT in general) work ok with file permisions, ownership, soft 
> and hard links, named sockets, device files and similar "strange" 
> filesystem objects? Do I need any options to GIT to make it work with 
> them?

Git in general only preserves executable bit, deals with symlinks,
hardlinks after a fashion (stored once, but unpacked/checked out as separate
files, not hardlinked), and does not deal with other "strange" filesystem
objects as far as I know.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

```

## Matt McCutchen, 2006-08-28 00:40

Subject: Re: File archiver using git
Message-ID: <3bbc18d20608271740m63be7ae9qc49ec944f5131030@mail.gmail.com>
URL: https://gitlist.dev/e/3bbc18d20608271740m63be7ae9qc49ec944f5131030%40mail.gmail.com
In-Reply-To: <Pine.LNX.4.63.0608271528130.8018@alpha.polcom.net>

```
On 8/27/06, Grzegorz Kulewski <kangur@polcom.net> wrote:
> Does it (and GIT in general) work ok with file permisions, ownership, soft
> and hard links, named sockets, device files and similar "strange"
> filesystem objects? Do I need any options to GIT to make it work with
> them?

Git tracks data, not filesystems.  That means it doesn't handle any of
the things you mentioned except soft links.  It doesn't even handle
empty directories, though I don't accept the argument that they do not
constitute data.  If you want to capture a filesystem, I would
recommend running "find . -ls" to create a listing file from which
everything you mentioned can be reconstructed and then putting the
filesystem together with the listing file into git.

> Can I for example securely backup or even version-control /etc directory?

With the above technique, you can do both.  However, if you just want
to back up /etc, you might be better served by a backup tool.  For
example, I use rsnapshot ( http://www.rsnapshot.org/ ).

Matt

```
