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.0k times
10
BeginnersSake
- 570
- 2
- 15
- 28
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
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