if (objectId == null) {
JGitUtils.createOrphanBranch(repository, "gh-pages", null);
}
System.out.println("Updating gh-pages branch...");
ObjectId headId = repository.resolve(ghpages + "^{commit}");
ObjectInserter odi = repository.newObjectInserter();
try {
// Create the in-memory index of the new/updated issue.
DirCache index = createIndex(repository, headId, sourceFolder,
obliterate);