diff --git a/git-flow-bugfix b/git-flow-bugfix index 720e86dc..0d0fe7f7 100644 --- a/git-flow-bugfix +++ b/git-flow-bugfix @@ -438,6 +438,10 @@ helper_finish_cleanup() { remotebranchdeleted=$FLAGS_FALSE localbranchdeleted=$FLAGS_FALSE + if flag push; then + git_do push "$ORIGIN" "$BASE_BRANCH" || die "Could not push branch '$BASE_BRANCH' to remote '$ORIGIN'." + fi + if noflag keep; then # Always delete remote first @@ -469,10 +473,6 @@ helper_finish_cleanup() { fi fi - if flag push; then - git_do push "$ORIGIN" "$BASE_BRANCH" || die "Could not push branch '$BASE_BRANCH' to remote '$ORIGIN'." - fi - echo echo "Summary of actions:" echo "- The bugfix branch '$BRANCH' was merged into '$BASE_BRANCH'" diff --git a/git-flow-feature b/git-flow-feature index 275f54bd..7b4729ab 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -438,6 +438,10 @@ helper_finish_cleanup() { remotebranchdeleted=$FLAGS_FALSE localbranchdeleted=$FLAGS_FALSE + if flag push; then + git_do push "$ORIGIN" "$BASE_BRANCH" || die "Could not push branch '$BASE_BRANCH' to remote '$ORIGIN'." + fi + if noflag keep; then # Always delete remote first @@ -469,10 +473,6 @@ helper_finish_cleanup() { fi fi - if flag push; then - git_do push "$ORIGIN" "$BASE_BRANCH" || die "Could not push branch '$BASE_BRANCH' to remote '$ORIGIN'." - fi - echo echo "Summary of actions:" echo "- The feature branch '$BRANCH' was merged into '$BASE_BRANCH'" diff --git a/git-flow-hotfix b/git-flow-hotfix index f97ed44a..855b52ff 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -582,6 +582,16 @@ T,tagname! Use given tag name run_post_hook "$VERSION_PREFIX$TAGNAME" "$ORIGIN" "$BRANCH" + if flag push; then + if [ "$BASE_BRANCH" = "$MASTER_BRANCH" ]; then + git_do push "$ORIGIN" "$DEVELOP_BRANCH" || die "Could not push branch '$DEVELOP_BRANCH' to remote '$ORIGIN'." + fi + git_do push "$ORIGIN" "$BASE_BRANCH" || die "Could not push branch '$BASE_BRANCH' to remote '$ORIGIN'." + if noflag notag; then + git_do push --tags "$ORIGIN" || die "Could not push tags to remote '$ORIGIN'." + fi + fi + # Delete branch if noflag keep; then @@ -611,16 +621,6 @@ T,tagname! Use given tag name fi - if flag push; then - if [ "$BASE_BRANCH" = "$MASTER_BRANCH" ]; then - git_do push "$ORIGIN" "$DEVELOP_BRANCH" || die "Could not push branch '$DEVELOP_BRANCH' to remote '$ORIGIN'." - fi - git_do push "$ORIGIN" "$BASE_BRANCH" || die "Could not push branch '$BASE_BRANCH' to remote '$ORIGIN'." - if noflag notag; then - git_do push --tags "$ORIGIN" || die "Could not push tags to remote '$ORIGIN'." - fi - fi - echo echo "Summary of actions:" if flag fetch; then diff --git a/git-flow-release b/git-flow-release index e9c542da..3105a085 100644 --- a/git-flow-release +++ b/git-flow-release @@ -174,6 +174,18 @@ _finish_from_develop() { run_post_hook "$VERSION_PREFIX$TAGNAME" "$ORIGIN" "$BRANCH" + if flag push; then + if flag pushdevelop; then + git_do push "$ORIGIN" "$DEVELOP_BRANCH" || die "Could not push branch '$DEVELOP_BRANCH' to remote '$ORIGIN'." + fi + if flag pushproduction; then + git_do push "$ORIGIN" "$MASTER_BRANCH" || die "Could not push branch '$MASTER_BRANCH' to remote '$ORIGIN'." + fi + if noflag notag && flag pushtag; then + git_do push --tags "$ORIGIN" || die "Could not push tags to remote '$ORIGIN'." + fi + fi + # Delete branch if noflag keep; then @@ -207,18 +219,6 @@ _finish_from_develop() { fi fi - if flag push; then - if flag pushdevelop; then - git_do push "$ORIGIN" "$DEVELOP_BRANCH" || die "Could not push branch '$DEVELOP_BRANCH' to remote '$ORIGIN'." - fi - if flag pushproduction; then - git_do push "$ORIGIN" "$MASTER_BRANCH" || die "Could not push branch '$MASTER_BRANCH' to remote '$ORIGIN'." - fi - if noflag notag && flag pushtag; then - git_do push --tags "$ORIGIN" || die "Could not push tags to remote '$ORIGIN'." - fi - fi - echo echo "Summary of actions:" if flag fetch; then