3 ms·
Another shameless plug, for my git-hooks project I wrote a few years ago https://github.com/icefox/git-hooks https://github.com/icefox/git-hooks It is a single
by icefox 12y ago
Another shameless plug, for my git-hooks project I wrote a few years ago https://github.com/icefox/git-hooks https://github.com/icefox/git-hooks It is a single small bash script with no external depenandancies so it just needs to be in your path.
git-hooks provide a way to manage and share your hooks using three+ locations:
User hooks, installed in ~/.git_hooks/
Project hooks, installed in .git/git_hooks/ in a project.
Global hooks, specified with the hooks.global configuration option.
Another very real problem with any hooks solution is that it must be enabled in each repository. Users frequently either don't do it or forget to do it in all of the repositories. Running git hooks --installglobal will force any new git repository or any git repository you clone to have a reminder to install git hooks. (It can't be on by default for security reasons of course.)
- michaelmior 12y agoThanks for this! It's been a while, but I did use it a year or so ago for a project at work and it was quite handy. It's unfortunate that git doesn't have something like this built-in.