-
Initialize a new git repository at
/etc/
cd /etc/ sudo git init
-
Setup
.gitignore
cat << 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 -e
and add the following line
0 * * * * cd /etc/ && git add . && git commit -a -m "hourly commit" 2>&1 >> /var/log/cron.log
Use
tail -f /var/log/cron.log
andtail -f /var/log/syslog | grep CRON
to monitor cron activities. -
Use
sudo gitg
to 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