Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- id: leash
name: git-leash
description: Block commits based on configurable time windows. Helps you stay focused on what you're supposed to be doing. Overridable when you genuinely need to ship.
entry: leash check
language: unsupported_script
always_run: true
pass_filenames: false
require_serial: true
stages: [pre-commit]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ leash install --global

`leash install` automatically adds `.leash` and `.leash-slip` to `.git/info/exclude` — no `.gitignore` modifications, nothing tracked, pure stealth.

## Install with [pre-commit](https://pre-commit.com)

If you're already using https://pre-commit.com, you can add this hook to your repository's `.pre-commit-config.yaml` file.
The existence won't be stealthy in that case, as `.pre-commit-config.yaml` is normally committed to the repo.

```yaml
repos:
- repo: https://github.com/SiteRelEnby/git-leash
rev: v0.1.3 # see https://github.com/SiteRelEnby/git-leash/releases
hooks:
- id: leash
```

## Config

Place at `~/.leash` (global) or `.leash` in your repo root (project-local overrides global).
Expand Down