What are Git Hooks?
Git hooks are scripts that are executed before or after Git events such as: commit, push and receive. You can use these to increase your productivity as a developer in a number of ways. It’s amazing to automatically run unit tests when you commit and preventing it when a test fails, or notify your team when a commit has successfully been pushed.
Each Git project should have a
.git/hooks directory where these hooks are stored.
Why use Husky?
Husky is a tool for Node.js that allows you to manage your hooks from your
package.json file. When you install Husky the first time, it will modify the files inside
.git/hooks so when you trigger a Git event, it will call the corresponding script that you configured in your