Skip to content

Instantly share code, notes, and snippets.

@indrisepos
Created September 10, 2016 16:09
Show Gist options
  • Select an option

  • Save indrisepos/767291f4f1a06ab2d5bc99220202e05e to your computer and use it in GitHub Desktop.

Select an option

Save indrisepos/767291f4f1a06ab2d5bc99220202e05e to your computer and use it in GitHub Desktop.
#!/bin/bash
# based on: http://stackoverflow.com/a/35115651
git status | grep modified | cut -d' ' -f 4 | while read x; do
x1="$(git show HEAD:$x | dos2unix | md5sum | cut -d' ' -f 1 )"
x2="$(cat $x | dos2unix | md5sum | cut -d' ' -f 1 )"
if [ "$x1" != "$x2" ]; then
echo "$x NOT IDENTICAL"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment