git-hooks is a command-line tool for managing Git hooks across repositories and development environments. It builds on the earlier icefox/git-hooks project and provides a structured alternative to maintaining separate copies of hook scripts.
The application is based around the idea that different checks belong in different places. Some should be shared with everyone working on a repository, others are personal preferences, while a third group may apply to every user on a particular machine.
git-hooks separates these responsibilities into different scopes. Developers can keep project-specific scripts under version control while retaining their own checks elsewhere. This reduces duplication and makes it easier to maintain consistent behaviour without forcing every repository to use identical hooks.
This is free and open source software.
Key Features
- Supports project, user and global scopes, allowing Git hooks to be managed at different levels.
- Uses symbolic links to reduce duplication of scripts and simplify the management of hook installations.
- Loads project-specific hooks from a githooks directory within the repository, allowing them to be tracked in version control.
- Loads personal hooks from ~/.githooks, making individual checks available across different repositories.
- Supports globally shared hooks through the hooks.global Git configuration setting.
- Provides a semi-private project scope for scripts that apply to an individual developer but should not be committed to the repository.
- Allows multiple scripts to be associated with a single Git event, such as pre-commit or commit-msg.
- Supports community hooks declared in a githooks.json file, downloading reusable scripts from external Git repositories.
- Stores downloaded community hooks in a dedicated local directory for reuse.
- Provides git hooks install and git hooks uninstall commands to enable or disable hook management within a repository.
- Can display configured hook scopes and provides commands for managing the installed tool.
Website: github.com/git-hooks/git-hooks
Support:
Developer: CatTail
License: MIT License
git-hooks is written in Go. Learn Go with our recommended free books and free tutorials.
Related Software
| Git Hook Managers | |
|---|---|
| lefthook | Git hooks manager for Node.js, Ruby, Python and more |
| husky | Git hooks made easy |
| pre-commit | Manage and maintain multi-language pre-commit hooks |
| GrumPHP | Automates PHP code quality checks through configurable Git hooks |
| prek | Reimagined version of pre-commit |
| overcommit | Manage and configure Git hooks |
| hk | Git hooks manager and project linting tool focusing on performance |
| simple-git-hooks | Simple git hooks manager for small projects |
| CaptainHook | Flexible Git hook manager |
| Githooks | Platform-independent hooks manager |
| git-hooks | Rewritten from icefox/git-hooks, with extra features |
| Autohook | Runs and organises Git hook scripts using a single Bash script |
| Jig | Git pre-commit hook on steroids |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |



Please read our Comment Policy before commenting.