Skip to content

NateEag/githooks.d

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

githooks.d

Git's hook system is very useful for automating workflow-related tasks.

It would be even better if you could register multiple programs for a hook to run.

Since such a feature is trivial to implement, it is a wheel that has been crafted many times over.

This is my re-invention.

Goals

  • Do not actively ambush Windows (i.e. don't require symlinks, because they're second-class citizens on Windows)
  • Allow sharing hook packages between different repositories
  • Fit my personal aesthetic

Hook Packages

Hook packages let you share git hooks between multiple projects. Why do that?

  • A company's repositories could share a commit message checker, to ensure every commit has a ticket ID in it.
  • A team's style guide could be written as pre-commit and pre-receive hooks, then used to enforce adherence across their projects.
  • Dependency managers like npm and pip are used by a lot of different projects. All those projects could share a generic set of git hooks for updating installed dependencies after pulls, checkouts, and rebases.

Tests

Install Bats, then:

cd tests
bats suite.bats

About

Yet another githook multiplexer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages