Permalink
Browse files

don't deploy if you staged changes but didn't commit

  • Loading branch information...
1 parent b2941b6 commit b977ad2dadec34df886efa3532354b7a0bdd206f @bronson committed May 6, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 bin/deploy
View
@@ -309,8 +309,9 @@ require_env() {
#
check_for_local_changes() {
- git --no-pager diff --exit-code --quiet || abort "commit or stash your changes before deploying"
- [ -z "`git rev-list @{upstream}.. -n 1 --quiet`" ] || abort "push your changes before deploying"
+ git --no-pager diff --exit-code --quiet || abort "commit or stash your changes before deploying"
+ git --no-pager diff --exit-code --quiet --cached || abort "commit your staged changes before deploying"
+ [ -z "`git rev-list @{upstream}.. -n 1`" ] || abort "push your changes before deploying"
}
#

0 comments on commit b977ad2

Please sign in to comment.