Commit to git repo on file changes. Nice one Arne Koehn! Track changes (like etckeeper does):

home | blog | Terrible people and places | Covid-19 links | Teh Internet | guest blog |rants | placeholder | political | projects | Gwen and Liam | Citadel patched | Tools | Scouts




Learn something new some days. Did not know about incron (or forgot).
If you need to automatically commit changed files (like configs), this looks good.
http://arne-koehn.de/blog/2010-07-24-automatic_git_commit/
The run down in case that goes away sometime:

1.  Install incron (currently in Debian / Ubuntu).

2.  Create a git repo for the /directory/to/watch
  cd /directory/to/watch
  git init
  git add file1 file2 (up to the number of files you want to commit)


3.  Add the user to /etc/incron.allow  - the one that runs the scripts and has the repo.

4.  incrontab -e
 - add a line like this:
 /directory/to/watch/ IN_MODIFY /script/to/run/bin/checkin.sh
That will run on file modification.

5.  Make some changes and check it out with:
  git log




[æ]