-
Initialize a new git repository at
/etc/cd /etc/ sudo git init -
Setup
.gitignorecat << EOF | sudo tee .gitignore ld.so.cache ld.so.conf mtab group- gshadow- passwd- shadow- EOF -
Make initial commit
sudo git add . sudo git commit -m "initial commit" -
Setup hourly commits using crontab:
sudo crontab -eand add the following line
0 * * * * cd /etc/ && git add . && git commit -a -m "hourly commit" 2>&1 >> /var/log/cron.logUse
tail -f /var/log/cron.logandtail -f /var/log/syslog | grep CRONto monitor cron activities. -
Use
sudo gitgto review/undo changes
Last active
January 1, 2016 14:59
-
-
Save HeinrichHartmann/8161357 to your computer and use it in GitHub Desktop.
Monitor /etc/ using git
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment