Git and Local / Server Hooks

I have been a proponent of pre-commit hooks for a very long time. After doing some searching, I found this lovely gem. It consists of a bunch of checks before you commit your code into the repository. A couple of my favorites:

  • php – Runs a PHP syntax check on all PHP files
  • merge_conflict – Makes sure you aren’t about to commit merge conflicts (you know, >>>>>>>> HEAD, stuff like that)
  • ruby_symbol_hashrockets – Prevents you from committing old-style Ruby hashes ( :hello => 'there' )

And much more. Highly recommended!

Leave a Reply

Your email address will not be published. Required fields are marked *