Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Latest commit

 

History

History
25 lines (14 loc) · 1.06 KB

README.md

File metadata and controls

25 lines (14 loc) · 1.06 KB

What Are Git Hooks?

For a general guide to git hooks, see Pro Git, by Scott Chacon.

This directory contains git hooks for post-merge and pre-commit. Once the hooks are put into place in your local git repo, they will automatically run.

Installing Git Hooks

To use these git hooks, soft link the .githooks directory into the appropriate location within your NuPIC repository. The following line shows how to link this directory into the git configuration in the right place.

ln -s /path/to/nupic/.githooks /path/to/nupic/.git/hooks

NOTE: _When installed, git may have pre-populated the .git/hooks directory with some sample scripts. You may need to rm -rf .git/hooks before the link command above will work.

Pre-Commit

The pre-commit file is executed before each commit and the commit fails if it returns a non-zero exit code. This can be overridden by committing files as follows:

git commit --no-verify ...

Post-Merge

After merging, you'll be notified if you need to rebuild.