echo "-----> Ensuring everything is pushed to git" if \[ \$\(git branch --list master \| wc -l\) -eq 0 \]; then echo "! Branch master doesn't exist" exit 1 fi if \[ \$\(git branch -r --list origin/master \| wc -l\) -eq 0 \]; then echo "! Branch origin/master doesn't exist" exit 1 fi if \[ \$\(git log origin/master..master \| wc -l\) -ne 0 \]; then echo "! Your branch master needs to be pushed to origin before deploying" exit 1 fi