Clone this project then continue in depend of your repository type.
it's simple, just copy hook file eg. src/pre-commit
into repository-dir/.git/hooks/
directory.
For Linux, don't forget to make it executable
- copy hook, eg.
src/pre-commit
intorepository-dir/.hg/
directory - modify
repository-dir/.hg/hgrc
file (create one if it doesn't exist) and add definition of precommit hook under[hooks]
section
if you have Linux
[hooks]
precommit = ./.hg/pre-commit
or if you have Windows
[hooks]
precommit = .hg\pre-commit
- For Windows is required to copy also
src/pre-commit.bat
script intorepository-dir/.hg
Yippie-Kai-Yay hook works now!