This repository has been archived by the owner. It is now read-only.
Simple hook management for Git
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Build Status Coverage Status Code Climate Dependency Status

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"

On Unix-like system, this will install Mestral into /usr/local/mestral. On Windows, this will install Mestral into %ALLUSERSPROFILE%/Mestral. An executable called git-hooks will be put into place, so you can run Mestral using $ git hooks.

You can also clone the Git repository and symlink the executable into your $PATH. For example:

$ git clone
$ 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

Getting started

Initially, you should add a hook repository, also known as a tape.

$ mestral add-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)