public static @Nullable GitBranch parseBranchRef(@NotNull Collection<GitRemote> remotes, String refName) {
    if (refName.startsWith(REFS_HEADS_PREFIX)) {
      return new GitLocalBranch(refName);
    }
    else if (refName.startsWith(REFS_REMOTES_PREFIX)) {
      return GitUtil.parseRemoteBranch(refName, remotes);
    }
    else {
      return null;
    }
  }
public static @Nullable GitBranch parseBranchRef(@NotNull Collection<GitRemote> remotes, String refName)