Skip to content

Instantly share code, notes, and snippets.

@trshafer
Created January 11, 2011 23:00
Show Gist options
  • Save trshafer/775343 to your computer and use it in GitHub Desktop.
Save trshafer/775343 to your computer and use it in GitHub Desktop.
precommit hook for checking reminders.txt content
#!/usr/bin/env ruby
reminder_location = 'ignored/reminders.txt'
file_location = File.join( File.dirname(__FILE__), '..', '..', reminder_location)
more_work_needed = IO.readlines(file_location).join('').strip != ''
exit 1 if more_work_needed
@trshafer
Copy link
Author

goes in .git/hooks

don't forget to:
chmod u+x .git/hooks/pre-commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment