Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 1f0cd75bdeb56ea19cc9d064cfb0b04080d91be2 1 parent abc1eb1
Shuky Dvir authored
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
1  git-flow-feature
@@ -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
4 git-flow-hotfix
@@ -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
5 git-flow-release
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.