【问题标题】:How to retrieve all history from all branches using jgit?如何使用 jgit 从所有分支中检索所有历史记录?
【发布时间】:2012-11-27 19:14:17
【问题描述】:

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

如何使用jgit达到同样的效果?

【问题讨论】:

    标签: java git jgit


    【解决方案1】:

    例如这样:

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

    【讨论】:

      猜你喜欢
      • 2023-02-18
      • 1970-01-01
      • 1970-01-01
      • 2013-02-13
      • 2019-06-27
      • 2016-03-13
      • 1970-01-01
      • 2021-09-04
      • 2014-06-07
      相关资源
      最近更新 更多