#!/bin/bash echo "prepush called" DIR=$PWD ROOT=$PWD/`git rev-parse --show-cdup` ROOT=${ROOT%/} result=0 #dryRun function dryRun(){ local result=0 pushMessage=`git push --dry-run --no-verify 2>&1` result=$? if [ $result -eq 0 ]; then if echo $pushMessage | grep -e "^Everything.\+" > /dev/null 2>&1; then result=1 fi else if echo $pushMessage | grep -e "has no upstream branch" > /dev/null 2>&1; then