Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple hook management for Git
Ruby
branch: master

README.md

Mestral

Build Status Coverage Status Code Climate Dependency Status

A hook manager for Git

About

Mestral allows to easily manage your Git hooks. Combine so called hooklets to form the hooks fitting your needs.

Installation

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 /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 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

Getting started

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

License

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.

Credits

  • Sebastian Staudt – koraktor(at)gmail.com
Something went wrong with that request. Please try again.