JGit project repository (jgit)
Java Other
Switch branches/tags
v5.0.2.201807311906-r v5.0.1.201806211838-r v5.0.0.201806131550-r v5.0.0.201806050710-rc3 v5.0.0.201805301535-rc2 v5.0.0.201805221745-rc1 v5.0.0.201805151920-m7 v4.11.1.201807311124-r v4.11.0.201803080745-r v4.10.0.201712302008-r v4.9.3.201807311005-r v4.9.2.201712150930-r v4.9.1.201712030800-r v4.9.0.201710071750-r v4.8.0.201706111038-r v4.8.0.201705170830-rc1 v4.7.2.201807261330-r v4.7.1.201706071930-r v4.7.0.201704051617-r v4.6.1.201703071140-r v4.6.0.201612231935-r v4.5.4.201711221230-r v4.5.3.201708160445-r v4.5.2.201704071617-r v4.5.1.201703201650-r v4.5.0.201609210915-r v4.4.1.201607150455-r v4.4.0.201606070830-r v4.4.0.201606011500-rc2 v4.4.0.201605250940-rc1 v4.4.0.201605041135-m1 v4.3.1.201605051710-r v4.3.0.201604071810-r v4.3.0.201603230630-rc1 v4.2.0.201601211800-r v4.2.0.201511101648-m1 v4.1.2.201602141800-r v4.1.1.201511131810-r v4.1.0.201509280440-r v4.0.1.201506240215-r v4.0.0.201506090130-r v4.0.0.201506020755-rc3 v4.0.0.201505260635-rc2 v4.0.0.201505191015-rc1 v4.0.0.201505050340-m2 v4.0.0.201503231230-m1 v3.7.1.201504261725-r v3.7.0.201502260915-r v3.7.0.201502031740-rc1 v3.6.2.201501210735-r v3.6.1.201501031845-r v3.6.0.201412230720-r v3.6.0.201411121045-m1 v3.5.3.201412180710-r v3.5.2.201411120430-r v3.5.1.201410131835-r v3.5.0.201409260305-r v3.5.0.201409071800-rc1 v3.4.2.201412180340-r v3.4.1.201406201815-r v3.4.0.201406110918-r v3.4.0.201406041058-rc3 v3.4.0.201405281120-rc2 v3.4.0.201405211411-rc1 v3.4.0.201405051725-m7 v3.3.2.201404171909-r v3.3.1.201403241930-r v3.3.0.201403021825-r v3.3.0.201402191814-rc1 v3.2.0.201312181205-r v3.2.0.201311130903-m3 v3.1.0.201310021548-r v3.1.0.201309270735-rc1 v3.0.3.201309161630-r v3.0.2.201311090911-r v3.0.2.201309041250-rc2 v3.0.0.201306101825-r v3.0.0.201306040240-rc3 v3.0.0.201305281830-rc2 v3.0.0.201305080800-m7 v2.3.1.201302201838-r v2.3.0.201302130906 v2.2.0.201212191850-r v2.1.0.201209190230-r v2.0.0.201206130900-r v1.3.0.201202151440-r v1.3.0.201202121842-rc4 v1.2.0.201112221803-r v1.1.0.201109151100-r v1.1.0.201109071825-rc3 v1.1.0.201109011030-rc2 v1.0.0.201106090707-r v1.0.0.201106081625-r v1.0.0.201106071701-r v1.0.0.201106051725-r v1.0.0.201106011211-rc3 v0.12.1 v0.11.3 v0.11.1 v0.10.1
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.mvn Configure max heap size for Maven build Dec 9, 2016
Documentation/technical reftable: explicitly store update_index per ref Aug 21, 2017
lib HttpClientConnection.getHeaderFields should support multiple values f… Jul 23, 2018
org.eclipse.jgit.ant.test Prepare 5.1.0-SNAPSHOT builds May 23, 2018
org.eclipse.jgit.ant Prepare 5.1.0-SNAPSHOT builds May 23, 2018
org.eclipse.jgit.archive Prepare 5.1.0-SNAPSHOT builds May 23, 2018
org.eclipse.jgit.http.apache HttpClientConnection.getHeaderFields should support multiple values f… Jul 23, 2018
org.eclipse.jgit.http.server Merge branch 'stable-5.0' Jun 5, 2018
org.eclipse.jgit.http.test HttpClientConnection.getHeaderFields should support multiple values f… Jul 23, 2018
org.eclipse.jgit.junit.http Prepare 5.1.0-SNAPSHOT builds May 23, 2018
org.eclipse.jgit.junit Return parsed objects from TestRepository.commit/tree/blob() Jun 28, 2018
org.eclipse.jgit.lfs.server.test Prepare 5.1.0-SNAPSHOT builds May 23, 2018
org.eclipse.jgit.lfs.server Prepare 5.1.0-SNAPSHOT builds May 23, 2018
org.eclipse.jgit.lfs.test Prepare 5.1.0-SNAPSHOT builds May 23, 2018
org.eclipse.jgit.lfs Merge branch 'stable-5.0' Jun 13, 2018
org.eclipse.jgit.packaging Update Jetty to 9.4.11.v20180605 Aug 18, 2018
org.eclipse.jgit.pgm.test Prepare 5.1.0-SNAPSHOT builds May 23, 2018
org.eclipse.jgit.pgm Make Reftable seek* and has* method names more consistent Jul 11, 2018
org.eclipse.jgit.test Introduce ProtocolV2Hook Aug 16, 2018
org.eclipse.jgit.ui Prepare 5.1.0-SNAPSHOT builds May 23, 2018
org.eclipse.jgit Merge branch 'stable-5.0' Aug 18, 2018
tools Fix version.sh to update version of imported jgit features Apr 5, 2017
.gitattributes Initial JGit contribution to eclipse.org Sep 29, 2009
.gitignore git ignore .DS_Store Jul 28, 2017
.mailmap Update .mailmap Jun 27, 2018
BUILD Bazel: Support building with Java 9 Feb 7, 2018
LICENSE Clean up LICENSE file Jul 2, 2010
README.md Update minimum JDK version in README Mar 6, 2017
WORKSPACE Update Jetty to 9.4.11.v20180605 Aug 18, 2018
pom.xml Update Jetty to 9.4.11.v20180605 Aug 18, 2018


Java Git

An implementation of the Git version control system in pure Java.

This package is licensed under the EDL (Eclipse Distribution License).

JGit can be imported straight into Eclipse, built and tested from there, but the automated builds use Maven.

  • org.eclipse.jgit

    A pure Java library capable of being run standalone, with no additional support libraries. It provides classes to read and write a Git repository and operate on a working directory.

    All portions of JGit are covered by the EDL. Absolutely no GPL, LGPL or EPL contributions are accepted within this package.

  • org.eclipse.jgit.ant

    Ant tasks based on JGit.

  • org.eclipse.jgit.archive

    Support for exporting to various archive formats (zip etc).

  • org.eclipse.jgit.http.apache

    Apache httpclient support

  • org.eclipse.jgit.http.server

    Server for the smart and dumb Git HTTP protocol.

  • org.eclipse.jgit.pgm

    Command-line interface Git commands implemented using JGit ("pgm" stands for program).

  • org.eclipse.jgit.packaging

    Production of Eclipse features and p2 repository for JGit. See the JGit Wiki on why and how to use this module.


  • org.eclipse.jgit.junit

    Helpers for unit testing

  • org.eclipse.jgit.test

    Unit tests for org.eclipse.jgit

  • org.eclipse.jgit.ant.test

  • org.eclipse.jgit.pgm.test

  • org.eclipse.jgit.http.test

  • org.eclipse.jgit.junit.test

    No further description needed


  • Native smbolic links are supported, provided the file system supports them. For Windows you must have Windows Vista/Windows 2008 or newer, use a non-administrator account and have the SeCreateSymbolicLinkPrivilege.

  • Only the timestamp of the index is used by jgit if the index is dirty.

  • JGit requires at least a Java 8 JDK.

  • CRLF conversion is performed depending on the core.autocrlf setting, however Git for Windows by default stores that setting during installation in the "system wide" configuration file. If Git is not installed, use the global or repository configuration for the core.autocrlf setting.

  • The system wide configuration file is located relative to where C Git is installed. Make sure Git can be found via the PATH environment variable. When installing Git for Windows check the "Run Git from the Windows Command Prompt" option. There are other options like Eclipse settings that can be used for pointing out where C Git is installed. Modifying PATH is the recommended option if C Git is installed.

  • We try to use the same notation of $HOME as C Git does. On Windows this is often not the same value as the user.home system property.

Package Features

  • org.eclipse.jgit/

    • Read loose and packed commits, trees, blobs, including deltafied objects.

    • Read objects from shared repositories

    • Write loose commits, trees, blobs.

    • Write blobs from local files or Java InputStreams.

    • Read blobs as Java InputStreams.

    • Copy trees to local directory, or local directory to a tree.

    • Lazily loads objects as necessary.

    • Read and write .git/config files.

    • Create a new repository.

    • Read and write refs, including walking through symrefs.

    • Read, update and write the Git index.

    • Checkout in dirty working directory if trivial.

    • Walk the history from a given set of commits looking for commits introducing changes in files under a specified path.

    • Object transport Fetch via ssh, git, http, Amazon S3 and bundles. Push via ssh, git and Amazon S3. JGit does not yet deltify the pushed packs so they may be a lot larger than C Git packs.

    • Garbage collection

    • Merge

    • Rebase

    • And much more

  • org.eclipse.jgit.pgm/

    • Assorted set of command line utilities. Mostly for ad-hoc testing of jgit log, glog, fetch etc.
  • org.eclipse.jgit.ant/

    • Ant tasks
  • org.eclipse.jgit.archive/

    • Support for Zip/Tar and other formats
  • org.eclipse.http.*/

    • HTTP client and server support

Missing Features

There are some missing features:

  • gitattributes support


Post question, comments or patches to the jgit-dev@eclipse.org mailing list. You need to be subscribed to post, see here:



See the EGit Contributor Guide:


About Git

More information about Git, its repository format, and the canonical C based implementation can be obtained from the Git website: