writeTrashFile(filename, contents);
git.add().addFilepattern(filename).call();
RevCommit commit = git.commit()
.setMessage(branch + ": " + filename).call();
if (originalBranch != null)
git.checkout().setName(originalBranch).call();
return commit;
} catch (IOException e) {
throw new RuntimeException(e);
} catch (GitAPIException e) {
throw new RuntimeException(e);