#!/bin/bash # 1. Fix Git Permissions (Critical in Docker) sudo chown -R $(whoami) .git git config --global --add safe.directory $(pwd) # 2. Re-connect Git Hooks # 'pre-commit install' is idempotent (it checks if the hook exists and exits fast). # It's safe to run on every start. if command -v pre-commit &> /dev/null; then pre-commit install else echo "⚠️ Warning: pre-commit not found. Skipping hook installation." fi # We REMOVED 'npm install' from here to speed up your daily workflow.