@nlib/githooks
A command to enable/disable git hooks scripts in repository/.githooks
.
Usage
Install @nlib/githooks
with the --save-dev
flag.
npm install --save-dev @nlib/githooks
That's all. If @nlib/githooks
is installed as the direct devDependency (listed in the package.json), it configures git hooks automatically.
Then, your scripts in repository/.githooks
are now recognized by git.
Note: Don't forget to run chmod +x .githooks/your-script
.
Uninstalling
<0.1.x
reverts the installation on uninstalling of this package. But uninstall lifecycle scripts were removed in npm@7, >0.1.x
do nothing on uninstalling of this package.
If you want to revert the configuration, please follow the steps below.
- Run
git config --local --unset core.hooksPath
- Delete the
.githooks