Created
January 29, 2016 08:58
-
-
Save sjeandeaux/bb4d3c589be16b561e44 to your computer and use it in GitHub Desktop.
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/sh | |
git stash -q --keep-index | |
############################################################### | |
# | |
# your command e.g : sbt clean compile | |
# | |
############################################################### | |
RESULT=$? | |
if [ $RESULT -eq 0 ] | |
then | |
git diff --quiet | |
RESULT=$? | |
if [ $RESULT -ne 0 ] | |
then | |
echo "Houston we have a problem with this f**g files:" | |
git diff --name-only | |
echo "Probably just add to your commit" | |
fi | |
fi | |
git stash pop -q | |
exit $RESULT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment