Skip to content

Tag: jgit

Get latest tag in branch with JGit

I am trying to get the JGit equivalent of the command I have tried getting all the tags in the project and then finding the greatest tag in the branch via the BranchListCommand, but that is to slow. I am stuck and I cannot find anything that help via my searches. Does anyone have any idea how to do the

Get the latest commit in a repository with JGit

I want to get the last commit metadata (the youngest one by date) in a repository using JGit. I know that I can get the commit metadata using: But how to get the latest commit hash? Is there any other way to get the youngest by date RevCommit in a repository directly? Answer Compare by dates of last commits in