-
Notifications
You must be signed in to change notification settings - Fork 749
Before You Commit
Git hooks allow custom scripts to be triggered by specific git actions. By default, they are stored in the .git/hooks
directory. Because the .git
directory can not be checked into version control, some setup is required to use our hooks.
Setting up the hooks is valuable because it ensures that your changes will pass the repo's tests.
In addition to the Installation requirements, you must install yamllint.
Installation is a single command that should be run from the repo directory ./bin/install-git-hooks.bash
.
This will create symlinks in .git/hooks
for all files in git-hooks
. That means that if a new file is added to this directory, you must install again. But if a file is updated, the update will be effective as a hook immediately.
If you have existing hooks that are also defined in .git/hooks
, they will be overwritten. Existing hooks that are not defined in git-hooks
will not be removed.