Skip to content

Instantly share code, notes, and snippets.

@walf443
Last active December 18, 2015 10:49
Show Gist options
  • Save walf443/5771147 to your computer and use it in GitHub Desktop.
Save walf443/5771147 to your computer and use it in GitHub Desktop.
check_conflict.sh
#!/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