public static void showOrPush(@NotNull Project project, @NotNull Collection<GitRepository> selectedRepositories) {
    ModalityState modality = ModalityState.defaultModalityState();
    TransactionGuard.getInstance().assertWriteSafeContext(modality);

    List<GitRepository> repositories = new ArrayList<>(selectedRepositories);
    ModalityUiUtil.invokeLaterIfNeeded(modality, project.getDisposed(), () -> {
      new GitPushAfterCommitDialog(project, repositories, null).showOrPush();
    });
  }
public static void showOrPush(@NotNull Project project, @NotNull Collection<GitRepository> selectedRepositories)