code: protected String gitFindBranches(final String branchName,
              final boolean firstMatch) throws MojoFailureException,
              CommandLineException {
          String wildcard = "*";
          if (branchName.endsWith("/")) {
              wildcard = "**";
          }
  
          String branches;
          if (firstMatch) {
              branches = executeGitCommandReturn("for-each-ref", "--count=1",
                      "--format=\"%(refname:short)\"", "refs/heads/" + branchName
                              + wildcard);
          } else {
              branches = executeGitCommandReturn("for-each-ref",
                      "--format=\"%(refname:short)\"", "refs/heads/" + branchName
                              + wildcard);
          }
  
          // on *nix systems return values from git for-each-ref are wrapped in
          // quotes
          // https://github.com/aleksandr-m/gitflow-maven-plugin/issues/3
          branches = removeQuotes(branches);
  
          return branches;
      }
docs: Executes git for-each-ref with <code>refname:short</code> format.
  
  @param branchName
  Branch name to find.
  @param firstMatch
  Return first match.
  @return Branch names which matches <code>refs/heads/{branchName}*</code>.
  @throws MojoFailureException
  @throws CommandLineException