Nanoprogrammed Penultimate Musicianship
    Wondering what’s next for npm?Check out our public roadmap! »


    0.1.0 • Public • Published

    git-guppy NPM version

    Git pre-commit hook for Git Guppy, a Simple git-hook integration for your gulp workflows.

    guppy streamlines and extends your git-hooks by integrating them with your gulp workflow. Git-hooks can now be managed through npm, allowing them to automatically be installed and updated. And because they integrate with gulp, it's easy to modify the workflow and even combine hooks with your other gulp tasks.

    guppy leverages these powerful existing systems as its backbone, allowing guppy (and therefore your git-hooks) to remain as simple and lightweight as possible through interfaces you're already familiar with.

    Pre-commit hook

    Read more about this hook at

    • By-passing it: using git commit --no-verify when installed and configured.


    Install with npm:

    $ npm install --save git-guppy-pre-commit-hook
    npm http GET
    npm http 304
    npm http GET
    npm http GET
    npm http GET
    npm http 304
    npm http 304
    npm http 304
    npm http GET
    npm http 304
    npm http GET
    npm http GET
    npm http 304
    npm http 304
    > git-guppy@0.2.1 postinstall /tmp/sp-quality/node_modules/git-guppy-pre-commit-hook/node_modules/git-guppy
    > scripts/install.js
    Thanks for installing git-guppy! Install any of the hooks available now!
    npm install --save git-guppy-pre-commit git-guppy-pre-commit git-guppy-post-commit ...
    Go to for a complete list!
    > git-guppy-pre-commit-hook@0.1.0 postinstall /tmp/sp-quality/node_modules/git-guppy-pre-commit-hook
    > ../git-guppy/scripts/install.js pre-commit
    pre-commit installed successfully
    git-guppy-pre-commit-hook@0.1.0 node_modules/git-guppy-pre-commit-hook
    ├── named-regexp@0.1.1
    └── git-guppy@0.2.1 (shelljs@0.3.0, lodash@2.4.1, lazypipe@0.2.2)

    After the installation is complete, the hook is installed at APP/.git/hook/pre-commit.


    Git integration


    The actual script that git will run to trigger guppy's hook will automatically be installed to your APP/.git/hooks/ directory. These are just a wrapper for invoking the gulp tasks that guppy registers.

    You can install guppy-hooks via npm

    Gulp integration

    Usually, pre-commit hooks can be used to trigger lint, code check, among other things. The following example creates a task called "check", which uses lint and jscs to verify the code prior to a commit. If the verification fails, the commit process halts as expected. If it passes, profit! and commit!

      var gulp = require("gulp");
      gulp.task("check", function() {
        // Check all the source and the test cases together
        return gulp.src(appSourcePaths.concat(testSourcePaths))
          .pipe(jshint(SP_QUALITY_MODULE_CONFIG_DIR + "/.jshintrc"))
          .pipe(jscs(SP_QUALITY_MODULE_CONFIG_DIR + "/.jscsrc"))
          .on("error", function() {
          .on("end", function() {
      // define guppy and its dependency hook to pre-commit.
      var guppy = require("guppy);

    An attempt to commit will result in failure if the code does not pass the check.

    mdesales@ubuntu [11/16/201416:28:31] /tmp/sp-quality (master *+) $ git commit
    [16:28:34] Using gulpfile /tmp/sp-quality/Gulpfile.js
    [16:28:34] Starting 'check'...
    [16:28:35] Finished 'check' after 69 ms
    [16:28:35] Starting 'pre-commit'...
      line 34  col 33  Missing semicolon.
      line 52  col 19  Missing semicolon.
      line 53  col 46  Missing semicolon.
    ✖ 3 problems

    However, you will be able to commit the code if the check passes!

    mdesales@ubuntu [11/16/201416:26:57] /tmp/sp-quality (master *+) $ git commit
    [16:27:02] Using gulpfile /tmp/sp-quality/Gulpfile.js
    [16:27:02] Starting 'check'...
    [16:27:02] Finished 'check' after 71 ms
    [16:27:02] Starting 'pre-commit'...

    If you are certain to by-pass the errors, you can use git's switch --no-verify. That way, the hook will NOT even be triggered!

    Git Guppy Core

    For full detail about the core of the project, please go to


    Kevin Lanni

    ** Modular Hooks Architecture **


    Copyright (c) 2014 Marcello de Sales, contributors. Released under the MIT license

    This file was generated by gulp-verb on August 10, 2014.


    npm i git-guppy-pre-commit-hook

    DownloadsWeekly Downloads






    Last publish


    • avatar