10

I was able to run the git commands via shell script. But is there any possible mean by which I can call each git statement i.e git show <SHA>:<file> directly from java ?

BeginnersSake
  • 650
  • 2
  • 18
  • 30
Developer
  • 161
  • 1
  • 2
  • 7

1 Answers1

11

You can use the Process API to execute git commands directly.

Or, you could use JGit, which is a Java implementation of git.

Roman Goyenko
  • 6,965
  • 5
  • 48
  • 81
Jeremy
  • 22,188
  • 4
  • 68
  • 81