Git Hooks
Like many other Version Control Systems, Git has a way to fire off custom scripts when certain important actions occur.
List of Hooks
- applypatch-msg
- commit-msg
- fsmonitor-watchman
- post-update
- pre-applypatch
- pre-commit
- pre-merge-commit
- pre-push
- pre-rebase
- pre-receive
- prepare-commit-msg
- push-to-checkout
- update
https://github.com/git/git/tree/master/templates
pre-commit Hooks
Javascript
-
husky
Modern native git hooks made easy. You can use it to lint your commit messages, run tests, lint code, etc… when you commit or push. -
lint-staged
Run linters on git staged files.
Python
- pre-commit
A framework for managing and maintaining multi-language pre-commit hooks.
Conventional Commits
-
commitizen
The commitizen command line utility. -
commitlint
Lint commit messages.
Automate Versioning
-
standard-version
Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org -
semantic-release
Fully automated version management and package publishing.