Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


SuperHooks is a quick way to have hooks apply across multiple projects. It allows you to decouple the hooks you use from the projects you use them in by pacing the hooks into separate folders.

Hooks are defined at three levels:

  • Global hooks : hooks available everywhere
  • User hooks : hooks used for your own user
  • Project hooks : hooks used only for a project

Once a hook gets invoked from git, all the different types of hook will run.


brew tap frankywahl/tap
brew install frankywahl/tap/super_hooks

Installation from source


  • go: to install it yourself from source


make install

This will create a binary tagged with the commit you're currently on


Install super_hooks into a git repository:

super_hooks install

List the current hooks:

super_hooks list

See the other options with:

super_hooks help

Creating hooks


Hook Type Location
User Hooks indicated by your hooks.user configuration
Project Hooks indicated by your hooks.local configuration
Global Hooks indicated by your configuration

The way most people work is to have a single folder with all hooks for them.

git config --global `pwd`

Note: You can have multiple configurations by either:

  1. adding them with the command: git config --add </path/to/hooks/directory>
  2. adding the paths in a comma separated value way


Once super_hooks is installed, you can easily create hooks by placing executables files (chmod 755) under a folder with the hook name. For example, if you were to create a pre-commit hook for your user, you would do the following:

mkdir -p ~/.git_hooks/pre-commit/
git config hooks.user ~/.git_hooks
touch ~/.git_hooks/pre-commit/cool_hook
chmod 755 ~/.git_hooks/pre-commit/cool_hook

Note: having a --about option when running your executable will allow you to have a short description when listing hooks. See my rake example for this project.

Example: I have my own hooks which I have installed for all of my projects:

git clone somewhere
cd somewhere
git config --global `pwd`


You can get help on the command line to see supported commands:

super_hooks --help

Then for a specific operation example

super_hooks install --help

Code Status


  1. Fork it ([my-github-username]/super_hooks/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request


Copyright (c) 2020 Franky W.


A great thanks to icefox git-hooks which was greatly used for this project and his blogpost