Roo-Code/.husky/pre-commit

8 lines
178 B
Text

branch="$(git rev-parse --abbrev-ref HEAD)"
if [ "$branch" = "main" ]; then
echo "You can't commit directly to main - please check out a branch."
exit 1
fi
npx lint-staged