{
"scripts": {
"postinstall": "husky",
}
}
echo hello world.BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
if [ "$BRANCH_NAME" = "main" ]; then
echo "You can't push directly to master branch."
exit 1
fi
추신. 협업 관리 도구로서도 좋은 라이브러리지만, testing library를 같이 사용하였을 때 더 요긴하게 쓸 수 있는 라이브러리이지 않을까 생각이 듦. 예를 들어 pre-push 파일에 yarn test를 추가하면 테스트를 수행하여 문제가 있을 시 push를 중단할 수 있음.