cang-ying/scripts/install-git-hooks.sh
2026-07-13 12:11:52 +08:00

6 lines
197 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
repo_root="$(git rev-parse --show-toplevel)"
git config core.hooksPath "$repo_root/.githooks"
printf '%s\n' "Git 密钥保护已启用:$repo_root/.githooks"