#!/bin/bash # Pre-commit hook: block direct modifications to core/ subtree if git diff --cached --name-only | grep -q '^core/'; then echo '==========================================' echo 'ERROR: Do not modify core/ directly!' echo 'Make changes in ems-core repo instead.' echo 'Then run: git subtree pull --prefix=core ems-core main --squash' echo '==========================================' exit 1 fi