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
  • 570
  • 2
  • 15
  • 28
Developer
  • 161
  • 1
  • 2
  • 7

1 Answers1

10

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,764
  • 5
  • 47
  • 79
Jeremy
  • 21,745
  • 4
  • 64
  • 79