pre-commit and post-commit for linux