Skip to content

Instantly share code, notes, and snippets.

@PogiNate
Created April 17, 2013 22:48
Show Gist options
  • Save PogiNate/5408412 to your computer and use it in GitHub Desktop.
Save PogiNate/5408412 to your computer and use it in GitHub Desktop.
Simple commit hook to update a file. This is mostly for my edification and use, and will probably be of no help to anyone else.
#!/bin/sh
false|tee stats # empty out the stats file
git diff --numstat HEAD HEAD~1 | egrep "txt|rtf|md" >> stats #write the stats file for any text-like files committed.
/Users/username/bin/bookBoard.rb # run a specific ruby script at the end of the commit process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment