https://github.com/hauleth/git-riff
Super simple git hooks launcher
https://github.com/hauleth/git-riff
git git-hooks hooks
Last synced: 2 months ago
JSON representation
Super simple git hooks launcher
- Host: GitHub
- URL: https://github.com/hauleth/git-riff
- Owner: hauleth
- License: isc
- Created: 2018-05-10T16:49:52.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-12-18T13:44:10.000Z (over 5 years ago)
- Last Synced: 2025-10-25T23:41:34.032Z (8 months ago)
- Topics: git, git-hooks, hooks
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git riff
Super simple [Git hooks][git-hooks] launcher. It doesn't manage hooks basing on
some file, it just launch them. So this is more suitable for managing personal
set of hooks instead of managing hooks on organization level.
## Installation
Fetch [git-riff](git-riff) and run it in your repository with `install` option.
Just like this:
./git-riff install
And it is done. If you have some hooks already then you can skip `git-riff` from
overwriting them by running it like that:
yes n | ./git-riff install
If you want your hooks to be managed by `git-riff` then check out
[Usage](#usage) section.
If you do not give a damn and want to thrash all your existing hooks then this
is for you:
yes | ./git-riff install
## Usage
`git-riff` allows you to group your hooks basing on their functionality like
that:
```
.git/
└── hooks
├── # unimportant stuff
└── hooks.d
├── email
│ └── pre-commit
├── style-check
│ └── pre-commit
├── trailing-whitespaces
│ └── pre-commit
├── unresolved-merge
│ └── pre-commit
└── wip-check
└── pre-push
```
So you create directory named `foo` in `.git/hooks/hooks.d` and there you create
executable files that are exactly the same as any other hooks and when hook is
fired all hooks are traversed and ran.
If you want to share your hooks as part of the project then you can create
directory in your project that will have the same structure as `hooks.d`
mentioned above, ex.:
```
.
└── hooks
└── lint
└── pre-commit
```
And then tell `git-riff` to check this directory via setting local configuration
option:
```
git config --local hooks.path $PWD/hooks
```
## License
See [LICENSE](LICENSE).
[git-hooks]: https://git-scm.com/docs/githooks