/git-hooks

A sample project for git hooks by using husky

Primary LanguageShellMIT LicenseMIT

git-hooks

A sample project for git hooks

How to use it

  1. Install husky
yarn add husky
  1. Copy git-hook-prepush.sh into your repo

  2. Modify git-hook-prepush.sh script depends on your need

  3. Add command in package.json

"husky": {
    "hooks": {
        "pre-push": "sh scripts/git-hook-prepush.sh"
    }
}

Reference

For more detail, please see the article: https://medium.com/p/b4a0b11d3215