Permalink
Browse files

adding a check if the branch exists in remote if so delete it

  • Loading branch information...
1 parent e1f57bf commit 1a191ec6d00dd5181d1492ddeb0f3715e60d7de5 Shuky Dvir committed Jul 19, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 git-flow-feature
View
@@ -347,7 +347,9 @@ helper_finish_cleanup() {
if noflag keep; then
git branch -d "$BRANCH"
- git push "$ORIGIN" :"$BRANCH"
+ check_remote=$(git branch -r | grep "$ORIGIN"/"$BRANCH" | wc -l)
+ if [ check_remote = 1 ]; then
+ git push "$ORIGIN" :"$BRANCH"
fi
echo

0 comments on commit 1a191ec

Please sign in to comment.