}
public static Git git(DirectoryResource dir) throws IOException
{
RepositoryBuilder db = new RepositoryBuilder().findGitDir(dir.getUnderlyingResourceObject());
return new Git(db.build());
}
public static Ref checkout(Git git, String remote, boolean createBranch, SetupUpstreamMode mode, boolean force)
throws JGitInternalException,
RefAlreadyExistsException, RefNotFoundException, InvalidRefNameException