private static @Nullable GitRemote getRemoteByName(@NotNull GitRepository repository, @NotNull String remoteName) {
    for (GitRemote remote : repository.getRemotes()) {
      if (remote.getName().equals(remoteName)) {
        return remote;
      }
    }
    return null;
  }
private static @Nullable GitRemote getRemoteByName(@NotNull GitRepository repository, @NotNull String remoteName)