diff --git a/docs/how-to.md b/docs/how-to.md index ef28ced4a..1dd46aa00 100644 --- a/docs/how-to.md +++ b/docs/how-to.md @@ -1,5 +1,12 @@ # How To +## Adding a New Hook + +Adding a hook is as simple as creating a file. This can be accomplished using your favorite editor, a script or a basic echo command. For example, on Linux/macOS: +```shell +echo "npm test" > .husky/pre-commit +``` + ## Startup files Husky allows you to execute local commands before running hooks. It reads commands from these files: