14 lines
260 B
Plaintext
Executable File
14 lines
260 B
Plaintext
Executable File
|
|
# prevent commits on master
|
|
branch="$(git rev-parse --abbrev-ref HEAD)"
|
|
if [ "$branch" = "master" ]; then
|
|
echo ""
|
|
echo "You can't commit directly to master branch"
|
|
echo "please create a pull request"
|
|
echo ""
|
|
exit 1
|
|
fi
|
|
|
|
# run linters
|
|
npx lint-staged
|