chore: block commits and pushes directly on master * chore: block commits and pushes directly on master Approved-by: Linus Flood Approved-by: Matilda Landström
9 lines
189 B
Plaintext
Executable File
9 lines
189 B
Plaintext
Executable File
branch="$(git rev-parse --abbrev-ref HEAD)"
|
|
|
|
if [ "$branch" = "master" ] || [ "$branch" = "main" ]; then
|
|
echo "❌ You can't commit directly to $branch"
|
|
exit 1
|
|
fi
|
|
|
|
yarn dlx lint-staged
|