← 返回命令列表

Linux command

lefthook 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Install git hooks

lefthook install

Add hook configuration

lefthook add pre-commit

Run hooks manually

lefthook run pre-commit

Uninstall hooks

lefthook uninstall

Generate sample config

lefthook dump

说明

lefthook is a fast and powerful Git hooks manager written in Go. It allows running multiple commands in parallel, supports any language for scripts, and provides flexible configuration through YAML files. lefthook is designed to be fast, using parallel execution and smart skipping to minimize hook runtime.

参数

install
Install lefthook git hooks.
uninstall
Remove lefthook git hooks.
add _hook_
Add configuration for a hook.
run _hook_
Run a hook manually.
dump
Print merged configuration.
version
Show version information.

FAQ

What is the lefthook command used for?

lefthook is a fast and powerful Git hooks manager written in Go. It allows running multiple commands in parallel, supports any language for scripts, and provides flexible configuration through YAML files. lefthook is designed to be fast, using parallel execution and smart skipping to minimize hook runtime.

How do I run a basic lefthook example?

Run `lefthook install` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does install do in lefthook?

Install lefthook git hooks.