JGit- Git with Java

JGit is the Java implementation of Git. It is a library, that also can be used in your own applications. It also provides some sort of CLI operations. EGit on the other side is the Eclipse team provider plugin for Git, which uses JGit as Git implementation.

JGit has very few dependencies, making it suitable for embedding in any Java application, whether or not the application is taking advantage of other Eclipse or OSGi technologies. JGit is a relatively full-featured implementation of Git written natively in Java, and is widely used in the Java community

JGit is more than simply a Java library for working with git repository.

Maven Repository

JGit can be consumed in a Maven build. Multiple artifacts are available, depending on the application's requirements:

  <repositories>
    <repository>
      <id>jgit-repository</id>
      <url>https://repo.eclipse.org/content/groups/releases/</url>
    </repository>
  </repositories>

  <!-- Core Library -->
  <dependencies>
    <dependency>
      <groupId>org.eclipse.jgit</groupId>
      <artifactId>org.eclipse.jgit</artifactId>
      <version>4.1.1.201511131810-r</version>
    </dependency>
  </dependencies>

  <!-- Smart HTTP Servlet -->
  <dependencies>
    <dependency>
      <groupId>org.eclipse.jgit</groupId>
      <artifactId>org.eclipse.jgit.http.server</artifactId>
      <version>4.1.1.201511131810-r</version>
    </dependency>
  </dependencies>

  <!-- AWT UI Helpers -->
  <dependencies>
    <dependency>
      <groupId>org.eclipse.jgit</groupId>
      <artifactId>org.eclipse.jgit.ui</artifactId>
      <version>4.1.1.201511131810-r</version>
    </dependency>
  </dependencies>

  <!-- JUnit Test Support -->
  <dependencies>
    <dependency>
      <groupId>org.eclipse.jgit</groupId>
      <artifactId>org.eclipse.jgit.junit</artifactId>
      <version>4.1.1.201511131810-r</version>
    </dependency>
  </dependencies>

JGit is also available from Maven central: JGit on Maven central

For SNAPSHOT versions of the upcoming release, the following repository can be used:

  <repository>
    <id>jgit-snapshot-repository</id>
    <url>https://repo.eclipse.org/content/groups/jgit/</url>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>

More About JGit

     »  JGit Objects

     »  Setup JGit(Git with Java)

     »  JGit - Create or Open Repository

     »  EGit - Eclipse plugin for Git




GitHub

GitHub is a Web-based Git repository hosting service. It offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features.

Learn More

Git

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Learn More

EGit

EGit is an Eclipse Team provider for the Git version control system. Git is a distributed SCM, which means every developer has a full copy of all history of every revision of the code, making queries against the history very fast and versatile.

Learn More