diff --git a/load_tooltips.sh b/load_tooltips.sh index a7ec461..3cd8696 100755 --- a/load_tooltips.sh +++ b/load_tooltips.sh @@ -24,6 +24,11 @@ grep -qxF "data/tooltips.json" .gitignore || echo "data/tooltips.json" >> .gitig echo "[7] Staging .gitignore only..." git add .gitignore +if [ -n "$(git diff --cached --name-only -- ':!.gitignore')" ]; then + echo "[8] Found staged files other than .gitignore. Please commit or unstage them first." + exit 1 +fi + if git diff --cached --quiet -- .gitignore; then echo "[8] No changes to commit; skipping git commit/push." else