javagitjgitkallithea

Get the list of commits using JGIT remotely


Is it possible to iterate through the list of commits remotely without having to clone the repo?

If no, what is/are the recommended approach to do so.

Use case: Display the list of commits on a web page and must always be up to date.

Sample output: expected output

Thank you.


Solution

  • Without cloning: that depends on the remote API proposed by the remote Git repos hosting server.

    For example, GItHub has a GitHub API which can be used to list commits in a repo.
    And it has a Java library (so, no JGit involved here)