I only want to run the git log
command to get some commit info, and don't want to do it after cloning a remote reprository to local. Wonder if there is quick way for JGit here?
Asked
Active
Viewed 173 times
-2

Rüdiger Herrmann
- 20,512
- 11
- 62
- 79

shen xieyin
- 25
- 5
1 Answers
0
All operations on a Git repository are local. In order to access the history of a repository, you must clone it first.
If you are only interested in the current state you may do a shallow clone to save some bandwidth.

Rüdiger Herrmann
- 20,512
- 11
- 62
- 79
-
Thanks, I figured it out by using new FileRepositoryBuilder().setGitDir() to t local repo. – shen xieyin Feb 13 '18 at 08:12