Git pre-commit hook to check PHP syntax

Similarly to SVN, Git supports hook scripts. They are located under

<workcopy>/.git/hooks/

applypatch-msg.sample  post-update.sample     prepare-commit-msg.sample
commit-msg.sample      pre-applypatch.sample  pre-rebase.sample
post-commit.sample     pre-commit             update.sample
post-receive.sample    pre-commit.sample

To check the syntax before committing, I found an interesting script

https://github.com/ReekenX/git-php-syntax-checker/blob/master/pre-commit

Works great for me,

save into .git/hooks/pre-commit