A hook manager for Git
Mestral allows to easily manage your Git hooks. Combine so called hooklets to form the hooks fitting your needs.
Mestral can be installed via a simple installation script:
$ ruby -e "$(curl -fLsS https://raw.github.com/mestral/mestral/install/install.rb)"
On Unix-like system, this will install Mestral into
Windows, this will install Mestral into
git-hooks will be put into place, so you can run Mestral
$ git hooks.
You can also clone the Git repository and symlink the executable into your
$PATH. For example:
$ git clone http://github.com/mestral/mestral.git $ ln -s mestral/bin/mestral /usr/local/bin/mestral
Additionally, you might want to add it as a command to Git, for example:
$ ln -s mestral/bin/mestral /usr/local/bin/git-hooks
Initially, you should add a hook repository, also known as a tape.
$ mestral add-tape https://github.com/mestral/tape
After that, list the available hooklets…
$ mestral list
… and enable those you like for the current Git repository:
$ mestral enable pre-commit check-whitespace
Additionally, you can execute a Git hook manually:
$ mestral execute pre-commit
This code is free software; you can redistribute it and/or modify it under the terms of the new BSD License. A copy of this license can be found in the LICENSE file.
- Sebastian Staudt – koraktor(at)gmail.com