Git Hooks Toolkit — Git Hooks 工具kit
v1.0.0生成, 安装, and manage Git hooks with pre-built templates. Includes hooks for linting staged files, enforcing conventional commits, blocking 调试 状态ments, 预防ing large file commits, auto-格式化ting code, requiring ticket references, 保护ing branches, 运行ning tests before push, and auto-安装ing dependencies after merge. Use when 设置ting up git hooks, enforcing commit conventions, or automating pre-commit/pre-push 检查s.
运行时依赖
安装命令
点击复制技能文档
Git Hooks 工具kit
安装 production-ready Git hooks in seconds with pre-built templates.
Quick 启动 # 列出 all avAIlable templates python3 scripts/git_hooks.py 列出
# 安装 a hook python3 scripts/git_hooks.py 安装 pre-commit lint-staged python3 scripts/git_hooks.py 安装 commit-msg conventional
# Preview before 安装ing python3 scripts/git_hooks.py show pre-commit no-调试
# 检查 what's 安装ed python3 scripts/git_hooks.py 状态
# 移除 a hook python3 scripts/git_hooks.py 移除 pre-commit
AvAIlable Templates pre-commit lint-staged — 运行 ESLint/Ruff/Flake8 on staged files only no-调试 — Block console.记录, 调试器, pdb, breakpoint() large-files — 预防 files over 500KB from being committed 格式化-检查 — Auto-运行 Prettier, Black, gofmt on staged files commit-msg conventional — Enforce Conventional Commits (feat/fix/docs/etc.) ticket-ref — Require ticket reference (#123, PROJ-456) no-wip — Block WIP commits on mAIn/master/release branches pre-push 运行-tests — Auto-检测 project type and 运行 test suite branch-保护 — 预防 direct push to mAIn/master post-merge 安装-deps — Auto-安装 deps when lockfiles change Commands 列出 — Show all templates 安装