致命:无法运行.git / hooks / pre-push:没有此类文件或目录
#!/bin/env bash
echo "Running RSpec"
bundle exec rspec spec
spec=$?
if [ $spec -eq 0 ]; then
echo -en "\\033[32mTests are green, pushing...\\033[0;39m\n"
exit 0
else
echo -en "\\033[1;31mCannot push, tests are failing. Use --no-verify to force push.\\033[0;39m\n"
exit 1
fi
我跑了。
chmod u+x .git/hooks/pre-push
并从此处获取代码: