コード例 #1
0
 public void commit(
     final String fileName,
     final String fileContent,
     final PersonIdent author,
     final PersonIdent committer,
     final String message)
     throws GitException, InterruptedException {
   FilePath file = gitDirPath.child(fileName);
   try {
     file.write(fileContent, null);
   } catch (Exception e) {
     throw new GitException("unable to write file", e);
   }
   git.add(fileName);
   git.setAuthor(author);
   git.setCommitter(committer);
   git.commit(message);
 }