Skip to content

Instantly share code, notes, and snippets.

@trcook
Created February 3, 2015 01:48
Show Gist options
  • Save trcook/e8a58760249890ae718e to your computer and use it in GitHub Desktop.
Save trcook/e8a58760249890ae718e 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