{"id":24302815,"url":"https://github.com/taigrr/hooks","last_synced_at":"2026-04-21T01:01:59.622Z","repository":{"id":170433215,"uuid":"646567878","full_name":"taigrr/hooks","owner":"taigrr","description":"taigrr's useful git hooks","archived":false,"fork":false,"pushed_at":"2026-04-12T08:19:46.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-12T10:15:38.012Z","etag":null,"topics":["git","gitleaks","hooks","lfs","mg"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taigrr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"taigrr"}},"created_at":"2023-05-28T20:04:23.000Z","updated_at":"2026-04-12T08:19:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"651f0e60-1bec-44f0-a83d-32ed7a9e4a26","html_url":"https://github.com/taigrr/hooks","commit_stats":null,"previous_names":["taigrr/hooks"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/taigrr/hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fhooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fhooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fhooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fhooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taigrr","download_url":"https://codeload.github.com/taigrr/hooks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fhooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32072323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T21:26:33.338Z","status":"ssl_error","status_checked_at":"2026-04-20T21:26:22.081Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","gitleaks","hooks","lfs","mg"],"created_at":"2025-01-17T00:19:30.165Z","updated_at":"2026-04-21T01:01:59.587Z","avatar_url":"https://github.com/taigrr.png","language":"Shell","funding_links":["https://github.com/sponsors/taigrr"],"categories":[],"sub_categories":[],"readme":"# hooks\n\nA collection of simple, fast git hooks for everyday use.\n\nMany people don't like git hooks these days, usually because they're slow.\nIf your git hooks are slow, your commits slow down and start to cause development\nfriction, which is to be avoided.\n\nThese hooks are simple and aim to add no more than a few milliseconds to your commits.\nFor example, using git-lfs hooks can cause some slowdowns on repos which aren't actually\nlfs-enabled, but adding lfs support to repos which already have hooks installed\nis an annoying extra step, so `git lfs track` is used to short-circuit this logic.\n\n## Prerequisites\n\n- [git](https://git-scm.com/)\n- [git-lfs](https://git-lfs.github.com/)\n- [gitleaks](https://github.com/gitleaks/gitleaks) (optional, for secret scanning)\n- [mg](https://github.com/taigrr/mg) (optional, for repo registration on push)\n\n## What these hooks do\n\nRather than try to lint code from a git hook, or run tests, etc., these hooks\nassume you're already a good developer. You know how to follow style guides,\nyou're ok with an occasionally failing CI job. That's what CI is for, after all.\n\nThese hooks don't try to hold your hand, they just prevent accidentally making\na couple of annoying blunders:\n\n| Hook | What it does |\n|------|-------------|\n| `pre-commit` | Blocks commits containing files over 5 MiB (unless tracked by LFS) |\n| `pre-commit` | Scans staged files for leaked secrets via gitleaks (skipped if gitleaks not installed) |\n| `commit-msg` | Validates [Conventional Commits](https://www.conventionalcommits.org/) format |\n| `post-checkout` | Runs `git lfs post-checkout` |\n| `post-commit` | Runs `git lfs post-commit` |\n| `post-merge` | Runs `git lfs post-merge` |\n| `pre-push` | Registers the repo with mg, then runs `git lfs pre-push` if LFS is active |\n\n## Installation\n\n### Quick Install (recommended)\n\n```bash\ngit clone https://github.com/taigrr/hooks.git ~/.git-hooks\ncd ~/.git-hooks \u0026\u0026 ./install.sh\n```\n\nThis sets `core.hooksPath` so **all** repos use these hooks. Updates to the\nhooks directory apply everywhere immediately.\n\nTo override hooks for a specific repo:\n\n```bash\ncd /path/to/repo\ngit config core.hooksPath /path/to/other/hooks\n```\n\n### Template Installation\n\nUse this if you only want **new** repos (created with `git init` or `git clone`)\nto receive a copy of these hooks:\n\n```bash\ngit clone https://github.com/taigrr/hooks.git ~/.git-hooks\ncd ~/.git-hooks \u0026\u0026 ./install.sh --template\n```\n\n\u003e **Note:** Existing repos won't be affected.\n\n### Check Status\n\nSee what's currently configured without changing anything:\n\n```bash\ncd ~/.git-hooks \u0026\u0026 ./install.sh --check\n```\n\n### Uninstall\n\n```bash\ncd ~/.git-hooks \u0026\u0026 ./uninstall.sh\n```\n\n## Configuration\n\n### File size limit\n\nThe file size limit in `pre-commit` defaults to **5 MiB**. To change it, edit the\n`size_limit` variable at the top of the `pre-commit` file:\n\n```bash\nsize_limit=$((10 * 2**20))  # 10 MiB\n```\n\n### Conventional Commits\n\nThe `commit-msg` hook enforces [Conventional Commits](https://www.conventionalcommits.org/)\nformat on your commit messages:\n\n```\n\u003ctype\u003e(\u003cscope\u003e): \u003cdescription\u003e\n```\n\nValid types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`,\n`ci`, `chore`, `revert`. Add `!` after the type/scope for breaking changes.\n\nMerge commits and fixup/squash commits are always allowed.\n\nTo disable this hook for a single commit:\n\n```bash\ngit commit --no-verify -m \"whatever\"\n```\n\n## Compatibility Notice\n\nThese hooks are not tested alongside any other hooks, or \"hook managers\" such as\npre-commit or Husky. They will almost certainly cause issues if used alongside\ngit-annex. You have been warned.\n\n## Contributing\n\nKeeping in mind that the hooks are supposed to be extremely generic and fast, I\ndon't know what else there might be to add, but if there's something you think\nI'm missing feel free to open a PR and I'll consider it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaigrr%2Fhooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaigrr%2Fhooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaigrr%2Fhooks/lists"}