Using git on / for configuration files
ilya
ilya at total-knowledge.com
Wed Jun 6 13:34:06 IDT 2012
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.
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
>
More information about the Linux-il
mailing list