Skip to content

Instantly share code, notes, and snippets.

@cantonic
Forked from trcook/autocommit.sh
Created July 19, 2016 19:50
Show Gist options
  • Save cantonic/33b2fe32e78fc029488f84700e9ba88d to your computer and use it in GitHub Desktop.
Save cantonic/33b2fe32e78fc029488f84700e9ba88d to your computer and use it in GitHub Desktop.
auto commit git. use fswatch to setup a file to auto-commit a git repo on file change
#!/bin/bash
# requires fswatch
fswatch -o . -e "\\.git.*"| xargs -n1 -I{} git commit -am "snapshot from autocommit_script.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment