- husky pre-commit hook blocks direct commits to main - github actions CI runs lint + build on PRs - PR template and CONTRIBUTING.md for workflow docs
9 lines
213 B
Bash
Executable File
9 lines
213 B
Bash
Executable File
#!/bin/sh
|
|
|
|
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
if [ "$branch" = "main" ]; then
|
|
echo "direct commits to main are blocked."
|
|
echo "create a feature branch: git checkout -b <username>/<feature>"
|
|
exit 1
|
|
fi
|