0

I would like a method that retrieves the git commit description (or commit hash --I'm not picky!) for a specified codebase. Something along the lines of:

public static retrieveGitDescription(File repositoryDirectory) {
    // magic!
}

The closest thing I could fine is this SO post about Injecting current git commit id into Java webapp, however I want to fetch the information at runtime.

Community
  • 1
  • 1
Brian Risk
  • 1,244
  • 13
  • 23

0 Answers0