1 2 3 4 5 6 7 8
#!/bin/sh set -e if ! git diff-index --quiet HEAD --; then echo 'Uncommitted changes detected:' git diff-index HEAD -- return 1 fi