Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

add git hooks

github-actions edited this page Feb 24, 2026 · 1 revision

Add github hooks

there are files in .githooks folder

make them executable ( for osx )

chmod +x .githooks/pre-commit
chmod +x .githooks/prepare-commit-msg
chmod +x setup-hooks.sh

then run below if using poetry

poetry run ./scripts/setup-hooks.sh

or

#pre-commit hooks won’t run if the script has CRLF
bash ./scripts/setup-hooks.sh

this will add these files inside your .git/hooks folder

# pre-commit
DRY_RUN=1 git commit --allow-empty -m "test pre-commit"
# post-checkout
DRY_RUN=1 git switch -
# post-merge: but did not show any op if everything up to date
DRY_RUN=1 git merge HEAD

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.