Skip to content

Instantly share code, notes, and snippets.

@jrk
Created September 15, 2009 20:17
Show Gist options
  • Save jrk/187604 to your computer and use it in GitHub Desktop.
Save jrk/187604 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# gitwait - watch file and git commit all changes as they happen
# via http://stackoverflow.com/questions/420143/making-git-auto-commit/965274#965274
#
while true; do
inotifywait -qq -e CLOSE_WRITE ~/.calendar/calendar
cd ~/.calendar; git commit -a -m 'autocommit on change'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment