private static @Nullable GitRemoteBranch getTrackedBranch(@NotNull GitRepository repository, @NotNull String branchName) {
    GitLocalBranch branch = repository.getBranches().findLocalBranch(branchName);
    return branch == null ? null : branch.findTrackedBranch(repository);
  }
private static @Nullable GitRemoteBranch getTrackedBranch(@NotNull GitRepository repository, @NotNull String branchName)