Skip to content

Instantly share code, notes, and snippets.

@paven
Created June 8, 2017 11:55
Show Gist options
  • Save paven/17811d4cdc649b6e1acfaec9d266388c to your computer and use it in GitHub Desktop.
Save paven/17811d4cdc649b6e1acfaec9d266388c to your computer and use it in GitHub Desktop.
run tests in hooks pre-push, post-rewrite, post-merge etc
#!/bin/sh
oldStash=b hash stash@{0}
git stash save --include-untracked
stash=b hash stash@{0}
mvn install
if [ $stash != $oldStash ]; then
git stash pop
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment