Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.04 KB

File metadata and controls

41 lines (30 loc) · 1.04 KB
title Hooks
description Built-in hooks (conventional commits, secret detection, branch naming) and custom shell commands.
order 4

Hooks

Built-in hooks

Built-ins are embedded in the binary — no network required.

Name Hook Description
conventional-commits commit-msg Validates Conventional Commits format
no-secrets pre-commit Detects common secret patterns in staged changes
branch-naming pre-commit Validates branch name matches convention
gitkit hooks list --available   # see all built-ins with descriptions
gitkit hooks add no-secrets     # install one (hook type inferred)

Custom hooks

Wire any shell command into a git hook:

gitkit hooks add pre-push "cargo test"

Managing hooks

gitkit hooks list            # list installed hooks
gitkit hooks show <hook>     # print hook content
gitkit hooks remove <hook>   # remove an installed hook

The gitkit wizard also shows installed hooks, pre-selects them and allows removal interactively.