Skip to content

Commit c985fe8

Browse files
committed
chore: add setup scripts for Git hooks configuration
1 parent be829eb commit c985fe8

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.scripts/setup-hooks.bat

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@echo off
2+
SETLOCAL
3+
4+
REM Configure Git to use the hooks directory
5+
git config core.hooksPath .githooks
6+
7+
ECHO Git hooks have been set up.
8+
9+
ENDLOCAL
10+
pause

.scripts/setup-hooks.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
# Set the hooks directory to the `.githooks` folder in the repository
4+
git config core.hooksPath .githooks
5+
6+
# Make the hooks executable
7+
chmod +x .githooks/*
8+
9+
echo "Git hooks have been set up."

0 commit comments

Comments
 (0)