private static boolean isGitRoot(@NotNull Project project, @NotNull VirtualFile root) {
    return GitRepositoryManager.getInstance(project).getRepositoryForRootQuick(root) != null;
  }
private static boolean isGitRoot(@NotNull Project project, @NotNull VirtualFile root)