diff --git a/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java b/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java index ca60a98d..39dc022b 100644 --- a/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java +++ b/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java @@ -990,9 +990,9 @@ protected void gitBranchDeleteForce(final String branchName) * If command line execution fails. */ protected void gitFetchRemoteAndCompareCreate(final String branchName) throws MojoFailureException, CommandLineException { - final boolean fetchOk = gitFetchRemote(); + final boolean remoteBranchExists = StringUtils.isNotBlank(gitFetchAndFindRemoteBranches(branchName, true)); if (gitCheckBranchExists(branchName)) { - if (fetchOk) { + if (remoteBranchExists) { getLog().info( "Comparing local branch '" + branchName + "' with remote '" + gitFlowConfig.getOrigin() + "/" + branchName + "'."); String revlistout = executeGitCommandReturn("rev-list", "--left-right", "--count",