javagit/src/main/java/edu/nyu/cs/javagit/api/DotGit.java
public static synchronized boolean existsInstance(File path) {
    String canonicalPath = "";

    try {
      canonicalPath = path.getCanonicalPath();
    } catch (IOException e) {
      //obviously, the answer is NO
      return false;
    }

    return INSTANCES.containsKey(canonicalPath);
  }
public static synchronized boolean existsInstance(File path) {
    String canonicalPath = "";

    try {
      canonicalPath = path.getCanonicalPath();
    } catch (IOException e) {
      //obviously, the answer is NO
      return false;
    }

    return INSTANCES.containsKey(canonicalPath);
  }
Checks if there is a DotGit instance for a given path

@param path
<code>File</code> object representing the path to the repository.
@return
true if exits, false otherwise;