1 2 3 4 5 6 7 8 9
#!/usr/bin/env bash if git grep --cached -I -e '<<<<<<<' -e '>>>>>>>' > /dev/null; then echo 'Cowardly refusing to commit with unresolved merges' exit 1 fi exit 0