cang-ying/scripts/install-git-hooks.sh

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"