Testing GIT Hooks Before Actually Committing
If you want to use GIT hooks (pre-commit, pre-push), but want to test them before actually committing, it's really easy to do.
If you’re using GIT hooks and want to be able to test them without adding cruft to your GIT repository, you can easily test individual hooks anytime. GIT hooks are, by default, executable files that can be run through a simple bash command.
From your repository
$ bash .git/hooks/pre-commit
This will execute the GIT hook and provide quick feedback without adding additional “testing” commits to your repo.
If you’re interested in getting GIT hooks setup for your JavaScript project, here’s a post on getting started: Save Yourself from Yourself.