Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 1a191ec6d00dd5181d1492ddeb0f3715e60d7de5 1 parent e1f57bf
authored July 19, 2011

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  git-flow-feature
4  git-flow-feature
@@ -347,7 +347,9 @@ helper_finish_cleanup() {
347 347
 	
348 348
 	if noflag keep; then
349 349
 		git branch -d "$BRANCH"
350  
-		git push "$ORIGIN" :"$BRANCH"
  350
+		check_remote=$(git branch -r | grep "$ORIGIN"/"$BRANCH" | wc -l)
  351
+		if [ check_remote = 1 ]; then
  352
+			git push "$ORIGIN" :"$BRANCH"
351 353
 	fi
352 354
 
353 355
 	echo

0 notes on commit 1a191ec

Please sign in to comment.
Something went wrong with that request. Please try again.