Git hooks
If you want to use githooks just copy it into repository's directory .git/hooks/hook-name
(pre-commit for pre commit hooks) and give it permissions to execute:
$ chmod +x .git/hooks/hook-name
If you use Symfony framework and Propel ORM, then it could be useful for you. This simple hook checks if every autogenerated Propel models is added to git repository. I made it after receiving information about missing models twice ;)
Again, if you use Symfony framework you probably know, how big can logs become. I suggest using logrotate
but this hook might be useful as well. It is executed every time you change branch and inform you that you might want to clean old logs.
If you changed branch then you'll probably don't need old logs.