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