husky - :dog: Git hooks made easy

  •        123

By default, husky expects your project's package.json and your .git directory to be at the same level. It can be configured to support monorepos or sub-directories.Check documentation for more.


cosmiconfig : ^4.0.0
execa : ^0.9.0
is-ci : ^1.1.0
pkg-dir : ^2.0.0
pupa : ^1.0.0
read-pkg : ^3.0.0
run-node : ^0.2.0
slash : ^1.0.0



Related Projects

pre-commit - Automatically installs a git pre-commit script in your git repository which runs your `npm test` on pre-commit

  •    Javascript

pre-commit is a pre-commit hook installer for git. It will ensure that your npm test (or other specified scripts) passes before you can commit your changes. This all conveniently configured in your package.json. But don't worry, you can still force a commit by telling git to skip the pre-commit hooks by simply committing using --no-verify.

precommit-hook - An npm installable git pre-commit hook used to lint and test your code

  •    Javascript

This module is a handy little tool that I wrote to help enforce code quality in Node.js projects. It allows you to run any scripts defined in your package.json before a commit is made. Version 2.0.0 of this module (and the current master branch in this repository) has been updated to use git-validate, as such the configuration key in package.json will be changed to "pre-commit" with a dash, instead of the old "precommit". All other functionality should work the same.

pre-commit-hooks - Some out-of-the-box hooks for pre-commit

  •    Python

Some out-of-the-box hooks for pre-commit. If you'd like to use these hooks, they're also available as a standalone package.

safe-commit-hook - pre-commit hook for Git that checks for suspicious files.

  •    Python

This is a git pre-commit hook that is inspired by the Gitrob project. They are currently in JSON format at ~/.safe-commit-hook/git-deny-patterns.json.

pre-commit - A framework for managing and maintaining multi-language pre-commit hooks.

  •    Python

A framework for managing and maintaining multi-language pre-commit hooks.

puppet-git-hooks - Git client and server side hooks for puppet development

  •    Shell

Git hooks to assist puppet module development. Client side hooks allow for various checks before commits are staged. Server side hooks are provided for infrastructural reinforcement of various standardization compliances. In your git repository you can symlink the pre-commit file from this repository to the .git/hooks/pre-commit of your repository you want to implement this feature.

pre-commit - A slightly improved pre-commit hook for git

  •    Javascript

A slightly improved pre-commit hook for git

fit-commit - A Git hook to validate your commit messages based on community standards.

  •    Ruby

A Git hook to validate your commit messages based on community standards. This creates a .git/hooks/commit-msg script which will automatically check your Git commit messages.

cz-cli - The commitizen command line utility.

  •    Javascript

When you commit with Commitizen, you'll be prompted to fill out any required commit fields at commit time. No more waiting until later for a git commit hook to run and reject your commit (though that can still be helpful). No more digging through to find what the preferred format is. Get instant feedback on your commit message formatting and be prompted for required fields. Now, simply use git cz instead of git commit when committing.

nbstripout - strip output from Jupyter and IPython notebooks

  •    Python

Opens a notebook, strips its output, and writes the outputless version to the original file. Useful mainly as a git filter or pre-commit hook for users who don't want to track output in VCS.

git-confirm - :question: Git hook to catch placeholders and temporary changes (TODO / @ignore) before you commit them

  •    Shell

Git hook to catch placeholders and temporary changes (TODO / @ignore) before you commit them. If you're security conscious, you may be reasonably suspicious of curling executable files. Here you're on HTTPS throughout though, and you're not piping directly to execution so you can check contents and the hash (against MD5 04baf1f87974681a92ee7fe8c0aa3aaa for v0.2.1) before using this, if you like.


  •    PHP

Subversion pre- or post-commit hook that can be used to copy committed files either on the same or a different server, via sftp or ftp.

Prettier - An opinionated code formatter.

  •    Javascript

Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary. Prettier can be run in your editor on-save, in a pre-commit hook, or in CI environments to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again!

dploy - An FTP/SFTP deployment tool built in node.js.

  •    CoffeeScript

DPLOY is an FTP/SFTP deployment tool built in node.js Uploads the latest changes by comparing the version on your server with your git repository. Will install the dploy.yaml file and set up a post-commit script on your .git/hooks folder so you can DPLOY from your commit message as well.

talisman - By hooking into the pre-push hook provided by Git, Talisman validates the outgoing changeset for things that look suspicious - such as authorization tokens and private keys

  •    Go

Talisman is a tool to validate code changes that are to be pushed out of a local Git repository on a developer's workstation. By hooking into the pre-push hook provided by Git, it validates the outgoing changeset for things that look suspicious - such as potential SSH keys, authorization tokens, private keys etc. The aim is for this tool to do this through a variety of means including file names and file content. We hope to have it be an effective check to prevent potentially harmful security mistakes from happening due to secrets which get accidentally checked in to a repository.

termit - Translations with speech synthesis in your terminal as a ruby gem

  •    Ruby

Termit is an easy way to translate stuff in your terminal. You can check out its node.js npm version normit.Idea by Nedomas. See and hear your messages translated to target lang every time you commit. You can do this two ways: overriding the git command, and using a post-commit hook in git.

churn - Providing additional churn metrics over the original metric_fu churn

  •    Ruby

File changes can be calculated on any single commit to look at method changes you need to be running churn over time. Using a git post-commit hook, configuring your CI to run churn. See the --past_history (-p) option to do a one time run building up past class and method level churn. Install with gem install churn or for bundler add to your Gemfile gem 'churn', require: false.

git-secrets - Prevents you from committing secrets and credentials into git repositories

  •    Shell

Prevents you from committing passwords and other sensitive information to a git repository.git-secrets scans commits, commit messages, and --no-ff merges to prevent adding secrets into your git repositories. If a commit, commit message, or any commit in a --no-ff merge history matches one of your configured prohibited regular expression patterns, then the commit is rejected.

gitlab-shell - Replacement for gitolite

  •    Ruby

GitLab Shell handles git commands for GitLab and modifies the list of authorized keys. GitLab Shell is not a Unix shell nor a replacement for Bash or Zsh. Maybe you wonder why in the case of git push over http(s) the Rails app doesn't handle authentication before delegating to GitLab Shell. This is because GitLab Rails doesn't have the logic to interpret git push commands. The idea is to have these interpretation code in only one place and this is GitLab Shell so we can reuse it for ssh access. Actually GitLab Shell executes all git push commands without checking authorizations and relies on the pre-receive hooks to check authorizations. When you do a git pull command the authorizations are checked before executing the commands (either in GitLab Rails or GitLab Shell with an API call to GitLab Rails). The authorization checks for git pull are much simpler since you only have to check if a user can access the repo (no need to check branch permissions).

ocstyle - Objective-C style checker

  •    Python

Make it easy to share and enforce style rules for Objective C. The less human time we spend thinking about whitespace and naming the better! Also enforces the existence of basic documentation.At Cue we use this as a git pre-commit hook. This way we ensure everyone maintains a consistent coding style with a minimum of effort.