About
    • AMMDI is an open-notebook hypertext writing experiment, authored by Mike Travers aka @mtraven. It's a work in progress and some parts are more polished than others. Comments welcome! More.
Search
Full
Twin Pages

historian

01 Jan 2022 07:48 - 01 Jan 2022 07:48

    • 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