Skip to content

Instantly share code, notes, and snippets.

View SebCorbin's full-sized avatar

Sébastien Corbin SebCorbin

View GitHub Profile
@SebCorbin
SebCorbin / README.md
Created August 11, 2023 13:51
Git post-checkout hook to detect applied missing migrations in Django

To install this hook

echo "#\!/bin/bash\npython manage.py check_applied_missing_migrations\n" > .git/hooks/post-checkout
chmod + .git/hooks/post-checkout
@SebCorbin
SebCorbin / .pre-commit-config.yaml
Created July 9, 2025 07:55
Clean translations on commit
repos:
- repo: local
hooks:
- id: unclean-translations-files
name: Check for unclean translations files
entry: bash -c '(cd src && ./manage.py makemessages && ./manage.py check_translations_files)'
pass_filenames: false
language: system
types_or: [ html, python ]