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 ?
Asked
Active
Viewed 1.3k times
10

BeginnersSake
- 650
- 2
- 18
- 30

Developer
- 161
- 1
- 2
- 7
-
Refer [this](http://stackoverflow.com/questions/23382979/calling-git-from-java-with-command-line). I believe this might help you. Thanks, M – Mukul Kumar Chaundhyan Mar 05 '17 at 03:07
1 Answers
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