Using git on / for configuration files
Eli Billauer
eli at billauer.co.il
Wed Jun 6 12:57:06 IDT 2012
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
--
Web: http://www.billauer.co.il
More information about the Linux-il
mailing list