Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Automatically install git pre hooks in your git repository that run your task

Notifications You must be signed in to change notification settings

alibaba-archive/git-pre-hooks

Repository files navigation

git-pre-hooks

NPM version node version Gittip

Automatically install git pre hooks in your git repository that run your task.

Installation

$ npm install git-pre-hooks --save-dev

Usage

First install git-pre-hooks from npm.

npm install git-pre-hooks --save-dev

Then add git-pre-hooks config in your package.json:

"git-pre-hooks": {
  "pre-commit": "make jshint",
  "pre-push": "make test",
  "pre-release": ["make test", "make build", "make test-build"],
  "post-release": "npm publish"
}

pre-release & post-release hook

If you are using git-extras, git-pre-hooks also support pre-release and post-release hook. Please make sure you install git-extras after 2014/12/03.

One-liner:

$ (cd /tmp && git clone --depth 1 https://github.com/tj/git-extras.git && cd git-extras && sudo make install)

License

MIT

About

Automatically install git pre hooks in your git repository that run your task

Resources

Stars

Watchers

Forks

Packages

No packages published