Pre-commit scripts appropriate for any project. These hooks are made as custom plugins under the pre-commit git hook framework.
Just add to your .pre-commit-config.yaml file with the following (replace rev)
- repo: https://github.com/vfunin/conventional-pre-commit
rev: <git tag or sha>
hooks:
- id: message
- id: branchOr add new config file (replace rev)
echo "repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: <git tag or sha>
hooks:
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/vfunin/conventional-pre-commit
rev: <git tag or sha>
hooks:
- id: message
- id: branch" > .pre-commit-config.yamlInstall the pre-commit script:
pre-commit installThat's it!
Now try 'normal' commit:
git commit -m "add a new feature"