{"id":19342246,"url":"https://github.com/bolasblack/git-hook-pure","last_synced_at":"2026-06-20T14:32:27.669Z","repository":{"id":138268469,"uuid":"150981243","full_name":"bolasblack/git-hook-pure","owner":"bolasblack","description":"git hook more freely and quickly","archived":false,"fork":false,"pushed_at":"2023-12-29T22:36:58.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-02-24T08:47:55.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bolasblack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-09-30T15:50:27.000Z","updated_at":"2022-04-11T05:56:53.000Z","dependencies_parsed_at":"2023-12-29T23:00:59.308Z","dependency_job_id":"4b04d6d7-20ce-4215-b482-0a80ce552301","html_url":"https://github.com/bolasblack/git-hook-pure","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/bolasblack/git-hook-pure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolasblack%2Fgit-hook-pure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolasblack%2Fgit-hook-pure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolasblack%2Fgit-hook-pure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolasblack%2Fgit-hook-pure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bolasblack","download_url":"https://codeload.github.com/bolasblack/git-hook-pure/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolasblack%2Fgit-hook-pure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34573729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-10T03:34:14.023Z","updated_at":"2026-06-20T14:32:27.650Z","avatar_url":"https://github.com/bolasblack.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-hook-pure\n\nYou needn't bootstrap nodejs in every git hook\n\n## Install with npm/yarn\n\n```bash\nyarn add git-hook-pure -D\n\n# or\n\nnpm install git-hook-pure --save-dev\n```\n\nWill create a folder `.githooks` in the same level as `.git`. And append code to all git hooks in `.git/hooks`.\n\nYou can put an executable file in `.githooks/` or `.githooks/[hookName]/`.\n\nThe file under `.githooks/` will be executed in all git hook and called by `/path/to/hook-file [hook name] [...git hook arguments]`.\n\nThe file under `.githooks/[hookName]/` will be executed in specified git hook and called by `/path/to/hook-file [...git hook arguments]`.\n\n## Install without npm/yarn\n\n```bash\nbash -c \"$(curl -fsSL https://raw.githubusercontent.com/bolasblack/git-hook-pure/master/install.sh)\"\n```\n\n## Work with [git lfs](https://git-lfs.github.com/)\n\ngit lfs need install some git hook, you can run `git lfs update -m` to get hook scripts and put them in `.githooks`.\n\nFor example you can put lfs script `.git/hooks/pre-push` into `.githooks/pre-push/git-lfs`.\n\nOr you can put script\n\n```bash\n#!/bin/sh\n\ncommand -v git-lfs \u003e/dev/null 2\u003e\u00261 || { echo \u003e\u00262 \"\\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .githooks/git-lfs.\\n\"; exit 2; }\n\nif [ \\\n  $1 = \"pre-push\" -o \\\n  $1 = \"post-checkout\" -o \\\n  $1 = \"post-commit\" -o \\\n  $1 = \"post-merge\" -o \\\n  ! t ] ; then\n  git lfs \"$@\" || exit\nfi\n\nexit 0\n```\n\ninto `.githooks/git-lfs`\n\n## Custom [`git-hook-template.sh`](git-hook-template.sh)\n\nChange npm script to:\n\n```js\n{\n  // ...\n  \"scripts\": {\n    \"postinstall\": \"./node_modules/git-hook-pure/git-hook-pure.sh install /the/path/to/template/file\"\n  }\n}\n```\n\n## Skip installation when running `npm install`\n\nYou can use the environment variable `GIT_HOOK_PURE_SKIP_INSTALL=1` to avoid the running of the install scripts.\n\n## Not working with `pnpm` v7\n\n1. Add setting into project `.npmrc`: `echo side-effects-cache=false \u003e .npmrc`\n2. Re-install dependencies: `rm -f node_modules/.pnpm/lock.yaml \u0026\u0026 pnpm install`\n3. Add a reaction to this issue and wish some day we can add this setting for `git-hook-pure` only: https://github.com/pnpm/pnpm/issues/5002\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolasblack%2Fgit-hook-pure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbolasblack%2Fgit-hook-pure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolasblack%2Fgit-hook-pure/lists"}