From aa53ca91f2611b77dc8724894ec5d9b04321e295 Mon Sep 17 00:00:00 2001 From: Alexander Zawinowski Date: Wed, 19 Apr 2023 18:04:54 +0300 Subject: [PATCH] Finish hotfix should checkout the master branch before tagging --- git-flow-hotfix | 1 + 1 file changed, 1 insertion(+) diff --git a/git-flow-hotfix b/git-flow-hotfix index 514a5099..f4325234 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -532,6 +532,7 @@ T,tagname! Use given tag name # In case a previous attempt to finish this release branch has failed, # but the tag was set successful, we skip it now if ! git_tag_exists "$VERSION_PREFIX$TAGNAME"; then + git_do checkout "$MASTER_BRANCH" || die "Could not check out branch '$MASTER_BRANCH'." if [ "$FLAGS_message" != "" ] && [ "$FLAGS_messagefile" != "" ]; then die "Use either -m,--message or -f,--messagefile. Can not use both options at the same time" fi