From c4d673ab1d65d10e1d72fa67c01e459026d18d39 Mon Sep 17 00:00:00 2001 From: Adam Rodger Date: Tue, 6 Nov 2018 20:00:01 +0000 Subject: [PATCH] Allowed a release branch to be renamed This is useful for situations in which there is an active release branch but then a hotfix is required that will require the release branch to bump the version. For example, if `release/1.2.1` exists but then `hotfix/1.2.1` happens, the release branch now needs renaming to `release/1.2.2`. --- git-flow-release | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/git-flow-release b/git-flow-release index e9c542da..9c9b217b 100644 --- a/git-flow-release +++ b/git-flow-release @@ -420,6 +420,7 @@ git flow release finish git flow release publish git flow release track git flow release delete +git flow release rename Manage your release branches. @@ -1095,3 +1096,15 @@ r,[no]remote Delete remote branch echo "- You are now on branch '$(git_current_branch)'" echo } + +cmd_rename() { + OPTIONS_SPEC="\ +git flow release rename [] + +Rename a given release branch +-- +h,help! Show this help +showcommands! Show git commands while executing them +" + gitflow_rename_branch "$@" +}