Skip to content

sean1093/git-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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