I have previously written about using Git to add revision history to existing rsync backups. Having performed a number of configuration changes and system upgrades recently, I have found another use of Git which has proven invaluable.

It’s a fairly obvious hack, but it turns out that turning selected configuration directories (for example /etc/apache2/ and /etc/exim4/) into in situ Git repositories is a very handy thing to do.

The revision log you get in a Git repo gives you a very handy place to note down the reasons behind a certain configuration change. This provides a very handy historical context for a change, meaning you’re less likely to remove something odd that turns out later on to have been important.

Having configuration under version control also means that even if you do accidentally remove or change something that later causes problems you can easily roll them back.

Another handy feature is the ability to easily branch, so you can very quickly experiment with some wild configuration settings and very quickly revert them to the original working configuration should they turn out to be problematic or if you run out of time to complete them.

So, give it a try!

3 thoughts on “Reducing the stress of configuration management with Git

  1. I’m looking at a possibly daring use of git – to allow me to have my codebase sitting on a removable (and easy to back up) ntfs drive, but have multiple virtualbox nix vm’s that can read off it (I guess via shared folders). My only concern is whether tortoise git is stable enough to do the job. Or maybe I just need the shared folder and use nix to maintain it on that drive?

  2. I think this may be more of a job for NFS; GIT is version control, not really for moving files around, plus unless you use something like gitosis there’s no central server (git is a totally different paradigm to centralised systems like SVN or CVS).

Leave a Reply