Add pre-commit, pre-push hooks formally

This commit is contained in:
2024-10-06 16:10:46 -05:00
parent 2866c2fe4a
commit acf81f6bf6
3 changed files with 113 additions and 0 deletions

10
.hooks/link.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
hooks=(
"pre-commit"
"pre-push"
)
for hook in "${hooks[@]}"; do
chmod +x .hooks/$hook.sh
ln -s -f ../../.hooks/$hook.sh .git/hooks/$hook
done