#!/bin/bash COMMIT=$(git log --oneline -1 --format=%s | sed 's/^.*: //') echo $COMMIT PREFIX="Post " if [ "$COMMIT" == "$PREFIX"* ]; then echo "The commit message starts with Post " else echo "The commit message does not start with Post, ignoring..." fi printf "\n"