Skip to content

Instantly share code, notes, and snippets.

@kkumler
Last active December 11, 2015 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkumler/492f6a2045292995ddb5 to your computer and use it in GitHub Desktop.
Save kkumler/492f6a2045292995ddb5 to your computer and use it in GitHub Desktop.
git post-checkout hook to stop spring when checking out a new branch.
#!/bin/bash
PREV_HEAD=$1
NEW_HEAD=$2
BRANCH_CHECKOUT=$3
if [[ $BRANCH_CHECKOUT == 1 ]]; then
# Show when it's been stopped, but not that it's already stopped.
bin/spring stop | grep --color=never stopped
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment