Posts by "Hugo Lime"

Protect your git branches with Husky

tl:dr To add a pre-commit git hook with Husky: Install Husky with npm install husky –save-dev Set the pre-commit command in your package.json: “scripts”: { “precommit”: “npm test” }, What are git hooks? Git hooks are scripts launched when carrying out some git actions. The most common one is the pre-commit hook that runs when performing… Continue reading