Re: Using a git repository on the root directory

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Miguel Ramos
Date: Saturday, April 17, 2010 - 4:15 am

2010/4/17  <david@lang.hm>:

No, but that's not my intention, I should have explained myself better.

What I mean, and what I've been doing with svn, is to keep versioned
copies of configuration files only; files in general would never be
added to the repository.
That's why a VCS would be (and svn has been) useful.

Can you see how useful it is, now?
You can have the same configuration files on several machines, you can
have different branches for machines which are configured differently,
merge in changes done on different branches.
Really, it's great, I've been using svn for this, and I'd never want to go back.
I can install an OS on a machine and get everything up and running very quickly.

The only thing is that not all configuration files are in /etc, some
are in /usr/src/linux, some in /boot, /var, etc, that's why the root
of the repository is root and not something else.
Also, although I could have different repositories for each of these
subtrees, because I use FreeBSD and linux, some files in one are in
/etc and in the other in /usr/local/etc, etc. That's why the root of
the repository is root.

Using a VCS almost totally fits this use case.
Configuration files are text, most often only one or two lines change,
I want to see diffs often, branching and merging is very important.
Moreover, using a centralized VCS is very artificial, and is only good
to centralize backups.
It only fits less well because git was thought out in a model where
every file in the repository directory should either belong to the
repository or be some kind of trash put in gitignore; this is not the
case here.


That's not weird to backup, that's the data you typically want to
backup frequently: data that keeps changing.
Not /var/run or /var/cache, which are trash after a crash, of course.
Why backup /usr, for instance, which you can recover by re-installing
applications?

But my use case isn't backups.


Well, David, you certainly made a good case defending using a VCS for
filesystems.
However, a versioned filesystem should be more adequate for that.
Why would one want diffs, patches, branches, merges for the entire filesystem?
If only there was one in general use...
FreeBSD had one, LFS, but they set it aside, I think it was buggy.


No, it's not. And it happens on every other directory other than root.
It looks like it finds the .git directory, but then has problems
finding the actual files.
It's not a cross filesystem problem.


Yes, that's it.
That "technique" is working for me now for the home directory repository.

With svn, I used to do a svn checkout --force, that would not complain
about existing directories and files (which were overwritten, and that
was exactly what I needed).


Hmmm...
thanks but I need diffs, branches and merges.

-- 
Miguel Ramos <mail@miguel.ramos.name>
PGP A006A14C
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Using a git repository on the root directory, Miguel Ramos, (Fri Apr 16, 1:44 pm)
Re: Using a git repository on the root directory, Gabriel Filion, (Fri Apr 16, 9:17 pm)
Re: Using a git repository on the root directory, Jakub Narebski, (Sat Apr 17, 1:42 am)
Re: Using a git repository on the root directory, Miguel Ramos, (Sat Apr 17, 4:15 am)
Re: Using a git repository on the root directory, Miguel Ramos, (Sat Apr 17, 4:39 am)
Re: Using a git repository on the root directory, Miguel Ramos, (Sat Apr 17, 4:58 am)