private void initGit() throws GitAPIException {
// create the repository
InitCommand init = Git.init();
init.setBare(false);
init.setDirectory(newProject.dir);
Git git = init.call();
if (!StringUtils.isEmpty(newProject.gitOrigin)) {
// set the origin and configure the master branch for merging
StoredConfig config = git.getRepository().getConfig();
config.setString("remote", "origin", "url", getGitUrl());