private static bool IsGitRepo(string cachedPath) { try { // Attempt to read the HEAD commit id. If this works, // it should give us enough confidence that the clone worked. return(Git.Id(cachedPath) != null); } catch { } return(false); }