如何使用jgit从所有分支中检索所有历史记录?

时间:2012-11-27 19:14:18

标签: java git jgit

看起来可以使用“git log”命令从git存储库中查看所有历史记录。 Git: How to retrieve all commits from all branches without notes?

如何使用jgit实现相同的结果?

1 个答案:

答案 0 :(得分:0)

就像这样:

...
Git git = new Git(repository);
Iterable<RevCommit> commits = git.log().all().call();
for (RevCommit commit : commits) {
    ...
}
相关问题