Add a check for missing files befor commit

This commit is contained in:
Jean-Marie Favreau
2025-05-03 11:32:58 +02:00
parent 7dd6412e59
commit 52370e3c09
2 changed files with 18 additions and 2 deletions

9
scripts/check-untracked.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
untracked=$(git ls-files --others --exclude-standard)
if [ -n "$untracked" ]; then
echo "Error: The following files are untracked and not ignored:"
echo "$untracked"
echo "Please add them to Git or ignore them in .gitignore before committing."
exit 1
fi