Archive

Archive for August, 2008

Tracking changes in /etc/ with git

August 8th, 2008

I just found this nice blogpost on planet larry. Since git is my favourite vcs i found it quite usefull. This way you’ll never miss any changes and can revert any mistakenly changed files.
In other news: There finally will be a book about git! The release it scheduled for december 2008 but amazon says it will ship on 15th of september. Anyway i allready preordered and am excited. Walking through the manpages sometimes is a pain in the ass so probably this will make it easier to dig into git’s “secret” features.

Update: I changed the cronscript to reflect the changed files:

#!/bin/bash
MYDATE=`date "+%Y-%m-%d %H:%M"`
echo "\n" >> /var/log/etc_git.log
echo "etc_git - $MYDATE" | tee -a /var/log/etc_git.log
pushd /etc
git add . 
git diff --name-status HEAD > /tmp/gitstatus
git commit -a -F /tmp/gitstatus | tee -a /var/log/etc_git.log
popd

computerstuff ,

Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos
und Materialien: