#! /bin/sh if [ -z "$(git branch)" ]; then exit 0 fi if [ -n "${GIT_DIR}" ]; then hooksdir="./${GIT_DIR}/hooks/" else hooksdir="./" fi . "${hooksdir}common.sh" isOnMasterBranch if [ $? -eq 0 ]; then echo "can't commit on master branch." echo "please commit on topic branch." exit 1 fi exit 0