pre-commit
checks your code for errors before you commit it.
pre-commit
is configurable.
Make sure you don't commit a merge conflict
$ git commit
pre-commit: detected a merge conflict
lib/foo.rb:13 <<<<<<< HEAD
You can bypass this check using `git commit -n`
Everyone adds console.log statements to help debug javascript. Make sure you don't accidentally commit one.
$ git commit
pre-commit: console.log found
public/javascripts/application.js:64 console.log('checking something');
You can bypass this check using `git commit -n`
pre-commit
comes with a variety of checks that you can turn on or off.
$ gem install pre-commit
$ pre-commit install
Please report bugs to github's issue tracker.