Skip to main content

Command Palette

Search for a command to run...

Using Githooks for CI/CD

Published
1 min read
Using Githooks for CI/CD

A tutorial on how to to use git-scripts for CI/CD

Create the package.json

Create a package.json by running:

npm init

Install git-scripts to the package by running:

npm install --save-dev git-scripts

Add the Git Hooks

After the devDependencies section, add:

  "devDependencies": {
    "git-scripts": "^0.2.1"
  },
  "git": { 
    "scripts": { 
      "pre-push": "<command(s) to run before git push>" 
    } 
  }

More from this blog

Kyle Schwartz's Blog

8 posts

Web Developer, Software Engineer, and Chef

Co-op Student @ Sanofi Pasteur

Using Githooks for CI/CD