private Repository openDirectory(String localGitFolderPath) throws IOException, NoHeadException, GitAPIException{
		FileRepositoryBuilder builder = new FileRepositoryBuilder();
		Repository repository = builder.setGitDir(new File(localGitFolderPath))
				.readEnvironment() // scan environment GIT_* variables
				.findGitDir() // scan up the file system tree
				.build();
		System.out.println("Opening directory: " + repository.getDirectory());
		return repository;
	}