#!/bin/bash output=$(git log --oneline origin/master.. | grep -iE 'fixup|wip') if [[ $? != 1 ]]; then echo "Found fixup or WIP commit(s):" echo "$output" exit 1 fi