Navigate to hooks folder and make pre-commit script cd ${GIT_REOP}/.git/hooks cp pre-commit.sample pre-commit Add below code to pre-comit script function checkForBinaries() { binaryFilesCount=0 echo "PWD: ${PWD}"