Add pre-commit and post-commit hooks