git pull message="$(git log --merges -n 1)" echo $(git log --merges -n 1) if [[ $message == *"__post__"* ]]; then echo "It's there!" fi