Permalink
Browse files

adding a delete option on the remote if the branch exists on remote

  • Loading branch information...
1 parent abc1eb1 commit 1f0cd75bdeb56ea19cc9d064cfb0b04080d91be2 Shuky Dvir committed Jul 19, 2011
Showing with 9 additions and 1 deletion.
  1. +1 −0 git-flow-feature
  2. +4 −0 git-flow-hotfix
  3. +4 −1 git-flow-release
View
@@ -350,6 +350,7 @@ helper_finish_cleanup() {
CHECK_REMOTE=$(git branch -r | grep "$ORIGIN"/"$BRANCH" | wc -l)
if [ $CHECK_REMOTE = 1 ]; then
git push "$ORIGIN" :"$BRANCH"
+ fi
fi
echo
View
@@ -263,6 +263,10 @@ cmd_finish() {
# delete branch
if noflag keep; then
git branch -d "$BRANCH"
+ CHECK_REMOTE=$(git branch -r | grep "$ORIGIN"/"$BRANCH" | wc -l)
+ if [ $CHECK_REMOTE = 1 ]; then
+ git push "$ORIGIN" :"$BRANCH"
+ fi
fi
if flag push; then
View
@@ -264,7 +264,10 @@ cmd_finish() {
git checkout "$MASTER_BRANCH"
fi
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
fi
if flag push; then

0 comments on commit 1f0cd75

Please sign in to comment.