git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriel Filion <lelutin@gmail.com>
To: Miguel Ramos <mail@miguel.ramos.name>
Cc: git@vger.kernel.org
Subject: Re: Using a git repository on the root directory
Date: Sat, 17 Apr 2010 00:17:17 -0400	[thread overview]
Message-ID: <4BC9364D.7020204@gmail.com> (raw)
In-Reply-To: <q2k3e2876431004161344vfff638a7ncfa74aa0e3b979dc@mail.gmail.com>

On 2010-04-16 16:44, Miguel Ramos wrote:
> Hi,
> 
> Is it possible with git to use a git repository on the root directory?
> I'm trying to replace subversion doing this.
> I used this method before to get my home directory versioned with
> success, so far.
> 

Although I'll give comments on the rest, is it really relvant to put all
of the filesystem into a version control system? From a system
administrator's point of view, backing up is more about keeping copies
of what's important in the computer than about versioning every tiny
change in the file system.

One example of something that is weird to backup is /var . It contains
data that will almost certainly always change.

A simpler thing to do if you'd like to be able to reinstall a computer
real quick would be to make an image of the computer (call it a ghost, a
dd of all the disk or whatever) and to establish a backup only for the
sensible data (say, for an LDAP server, you would backup ldap's ldiff
files and configuration). Then, restoring from a crash would just mean
to reinstall with the image of the disk and to restore the latest backup.

> When I'm on the root directory, things seem to work minimally. I do
> git status, etc, and get the expected results.
> However, if I change say to /etc, or any other directory, for that
> matter, then git status tells me that every file in the repository is
> deleted.
> Adding files doesn't work, nothing works at all.
> 

This sounds like an issue with finding the actual .git directory when
you are in /etc. is this directory under a different partition than / ?

> I have a populated repository elsewhere, I can clone this to an empty
> directory and then move .git to / to work around the demand that the
> target directory is empty and at the same time avoid overwriting
> files.

so, you're cloning to some temp dir, then moving temp/.git to / and then
using something like git checkout HEAD some/file/somewhere ?

> I know this is an unforeseen use of git, however, unforeseen might not
> imply forbidden.
> I'm pretty disappointed I couldn't get it working.
> 
> So the motivation for this posting is twofold:
> - Is this possible in some other way, or did I do something wrong (I'm
> new to git) ?

Check out the bup project[1], it uses the packfile format from git to
compress data but its focus is more on keeping versions of arbitrary
data rather than code files. it's still very new and lacks some
important features but it sure is promising.

[1] : http://github.com/apenwarr/bup

-- 
Gabriel Filion

  reply	other threads:[~2010-04-17  4:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16 20:44 Using a git repository on the root directory Miguel Ramos
2010-04-17  4:17 ` Gabriel Filion [this message]
2010-04-17  4:45   ` david
2010-04-17 11:15     ` Miguel Ramos
2010-04-17 11:48       ` david
2010-04-17 11:58         ` Miguel Ramos
2010-04-17 12:55           ` david
2010-04-17  8:42 ` Jakub Narebski
2010-04-17 11:39   ` Miguel Ramos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BC9364D.7020204@gmail.com \
    --to=lelutin@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mail@miguel.ramos.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).