Sunday, October 25, 2015

GIT: First steps with JGit

If you need a Java API for GIT, forget about JavaGit (it's just a wrapper around GIT CLI) and EGit - which internally uses JGit.

Useful snippets here

Download the library JAR here org.eclipse.jgit.jar, or if using maven consider using the dependency:

(the jar should end up in \org\eclipse\jgit\org.eclipse.jgit\ inside your stink-maven repo)

Looking at the examples, you must have a LOCAL repository.... there doesn't seem to be a way to query a remote repository, like one hosted on Stash, without first doing a git clone.... I look rather for a REST-based API, this one seems quite promising.

No comments: