Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 432 Bytes

README.md

File metadata and controls

30 lines (19 loc) · 432 Bytes

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