Last active
December 18, 2015 10:49
-
-
Save walf443/5771147 to your computer and use it in GitHub Desktop.
check_conflict.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
exec 1>&2 | |
git status --porcelain | cut -f3 -d ' ' | xargs -I% cat % | grep -A 3 -B 3 '<<<<< HEAD' && echo "********************** WARNING ***********************" && echo " CONFLICT MARKER FOUND" && echo "******************************************************" && exit 1 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment