private static @NlsSafe @NotNull String removeEndingDotGit(@NotNull String url) {
    url = removeTrailingSlash(url);
    final String DOT_GIT = ".git";
    if (url.endsWith(DOT_GIT)) {
      return url.substring(0, url.length() - DOT_GIT.length());
    }
    return url;
  }
private static @NlsSafe @NotNull String removeEndingDotGit(@NotNull String url)