Demo using pre-commit scripts in a front end project
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
git-hooks
gulp-tasks
gulp-utils
js
.gitignore
.jshintrc
LICENSE
README.md
gulpfile.js
karma.conf.js
package.json

README.md

pre-commit-demo

Demo using pre-commit scripts in a front end project

To Use

  • Clone the repo locally and run npm install && gulp install-git-hooks
  • Set a remote on your local repository
  • Make changes - add files, modify, etc... and then try to commit them - you should notice gulp tasks being ran on modified files in the /js dir!
  • If a change makes one of the gulp tasks (i.e. jshint) fail, then your commit should also fail!

NOTES

This is not meant to be a functional application of any kind - just demonstrating the usefulness of git hooks, especially when combined with NodeJS and Gulp!