How to clone a single file with jGit?
问题 I am working with jGit in Java and I have managed to clone an entire repository. But I can not find a way to download a single file inside a repository. I have tried: Change the URL specifying the path of the file. Change the URL by specifying a subdirectory. Neither of them worked. My code (clone whole repository) is as follows: public File cloneRepository(String url, String path) throws GitAPIException { File download = new File (path); if (download.exists()){ System.out.println("Error");