historian

30 Oct 2021 02:15 - 16 Dec 2022 12:22
Open in Logseq
    • hack for setting up a git repo to automatically save changes.
    • Need a better name. I just want to make it easy to set up automatic git change logging on a directory. I've done this before numerous times, making this page so I can find the magic again.
    • Ultrasimple, just make a file autogit.sh at toplevel with this contents and set up crontab as instructed:
    • # To setup # git init # git add -A # To add a cronjob on MacOS: # env EDITOR=emacs0; crontab -e # once a day? # 0 23 * * * cd /System/Volumes/Data/misc/repos/ammdi-augmented && ./autogit.sh # I believe this should be "every 5 minutes" # 0-59/5 * * * * cd /System/Volumes/Data/misc/repos/ammdi-augmented && ./autogit.sh # Commit everything. Note: won't actually make a commit if no changes. git add -A; git commit -a -m autogit