Tags: java|jgit Title: Java: Using JGit to clone a repository
Git.cloneRepository()
.setURI(remoteRepo)
.setDirectory(dir)
.call();
remoteRepo will be something like "[email protected]:denevell/BlogPosts.git" and dir is a File object stating where to put the new repository.
If the directory doesn't exist, you must create it with dir.mkdirs();