Using git on / for configuration files

Using git on / for configuration files

Kfir Lavi lavi.kfir at gmail.com
Wed Jun 6 17:29:52 IDT 2012


On Wed, Jun 6, 2012 at 1:34 PM, ilya <ilya at total-knowledge.com> wrote:

> It is generally possible, though I'd recommend making your git repo out of
> /etc, not /, since this is what you mostly want to track, and managing
> .gitignore of
> the whole FS will be too painful.
> One thing git does not track though, is file ownership. This might be a
> problem for
> some files.
>
> Git permission problem can be solve like this (Not the best, but still
usable):
http://stackoverflow.com/questions/3207728/retaining-file-permissions-with-git

On 06/06/12 12:57, Eli Billauer wrote:
> > Hi all,
> >
> > I'd just like to get your input before I do something stupid. The
> > idea, anyhow, is to create a git repository on my system's root
> > directory, and add many of the system's configuration files (e.g. some
> > of /etc/) for tracking.
> >
> > This sounds a bit bizarre even to me, but my question is: Do you see
> > anything bad that could happen?
> >
> > I can see a few advantages:
> >
> > 1. Keep track of my changes in the configuration files over time
> >
> > 2. Easily spot what has changed, if something breaks for no apparent
> > reason (after some well-meaning automatic utility "helps me out")
> >
> > 3. Possible to run a cronjob on "git commit -a", maintaining a history
> > of these files (and makes it easy to fall back to a known set)
> >
> > 4. More freedom to hack these files to solve a problem, knowing that
> > the "working set" it there to fall back to.
> >
> > 5. Migrating to a new computer by cloning the repository and
> > selectively patching the new system.
> >
> > And some disadvantages:
> >
> > 1. Opening a security loophole somehow (?)
> >
> > 2. Possibly exposing files containing secrets (otherwise readable by
> > root only, e.g. /etc/ppp/pap-secrets and other password files)
> >
> > 3. Running git as root
> >
> > 4. Mess up the system somehow because git wasn't meant to handle
> > sensitive files (?)
> >
> >
> >
> >
> > So what do you say? A bad idea? A brilliant idea? Everyone's doing it
> > and nobody told me?
> >
> > TAI,
> >
> >    Eli
> >
>
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20120606/2b8aa557/attachment.html>


More information about the Linux-il mailing list