Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 1 | # Java Git |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 2 | |
Robin Stocker | 9fbe88a | 2012-09-28 23:21:22 +0200 | [diff] [blame] | 3 | An implementation of the Git version control system in pure Java. |
| 4 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 5 | This project is licensed under the __EDL__ (Eclipse Distribution |
Robin Rosenberg | f84fb60 | 2012-08-01 23:25:20 +0200 | [diff] [blame] | 6 | License). |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 7 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 8 | JGit can be imported straight into Eclipse and built and tested from |
| 9 | there. It can be built from the command line using |
| 10 | [Maven](https://maven.apache.org/) or [Bazel](https://bazel.build/). |
| 11 | The CI builds use Maven and run on [Jenkins](https://ci.eclipse.org/jgit/). |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 12 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 13 | - __org.eclipse.jgit__ |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 14 | |
| 15 | A pure Java library capable of being run standalone, with no |
Robin Stocker | 9fbe88a | 2012-09-28 23:21:22 +0200 | [diff] [blame] | 16 | additional support libraries. It provides classes to read and |
| 17 | write a Git repository and operate on a working directory. |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 18 | |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 19 | All portions of JGit are covered by the EDL. Absolutely no GPL, |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 20 | LGPL or EPL contributions are accepted within this package. |
| 21 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 22 | - __org.eclipse.jgit.ant__ |
Robin Stocker | 9fbe88a | 2012-09-28 23:21:22 +0200 | [diff] [blame] | 23 | |
| 24 | Ant tasks based on JGit. |
| 25 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 26 | - __org.eclipse.jgit.archive__ |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 27 | |
| 28 | Support for exporting to various archive formats (zip etc). |
| 29 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 30 | - __org.eclipse.jgit.http.apache__ |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 31 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 32 | [Apache httpclient](https://hc.apache.org/httpcomponents-client-ga/) support. |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 33 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 34 | - __org.eclipse.jgit.http.server__ |
Robin Stocker | 9fbe88a | 2012-09-28 23:21:22 +0200 | [diff] [blame] | 35 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 36 | Server for the smart and dumb |
| 37 | [Git HTTP protocol](https://github.com/git/git/blob/master/Documentation/technical/http-protocol.txt). |
Robin Stocker | 9fbe88a | 2012-09-28 23:21:22 +0200 | [diff] [blame] | 38 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 39 | - __org.eclipse.jgit.lfs__ |
Robin Stocker | 9fbe88a | 2012-09-28 23:21:22 +0200 | [diff] [blame] | 40 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 41 | Support for [LFS](https://git-lfs.github.com/) (Large File Storage). |
Robin Stocker | 9fbe88a | 2012-09-28 23:21:22 +0200 | [diff] [blame] | 42 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 43 | - __org.eclipse.jgit.lfs.server__ |
| 44 | |
| 45 | Basic LFS server support. |
| 46 | |
| 47 | - __org.eclipse.jgit.packaging__ |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 48 | |
| 49 | Production of Eclipse features and p2 repository for JGit. See the JGit |
| 50 | Wiki on why and how to use this module. |
| 51 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 52 | - __org.eclipse.jgit.pgm__ |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 53 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 54 | Command-line interface Git commands implemented using JGit |
| 55 | ("pgm" stands for program). |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 56 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 57 | - __org.eclipse.jgit.ssh.apache__ |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 58 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 59 | Client support for the ssh protocol based on |
| 60 | [Apache Mina sshd](https://mina.apache.org/sshd-project/). |
Robin Stocker | 6b74aff | 2012-09-08 19:58:37 +0200 | [diff] [blame] | 61 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 62 | - __org.eclipse.jgit.ui__ |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 63 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 64 | Simple UI for displaying git log. |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 65 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 66 | ## Tests |
Robin Stocker | 6b74aff | 2012-09-08 19:58:37 +0200 | [diff] [blame] | 67 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 68 | - __org.eclipse.jgit.junit__, __org.eclipse.jgit.junit.http__, |
| 69 | __org.eclipse.jgit.junit.ssh__: Helpers for unit testing |
| 70 | - __org.eclipse.jgit.ant.test__: Unit tests for org.eclipse.jgit.ant |
| 71 | - __org.eclipse.jgit.http.test__: Unit tests for org.eclipse.jgit.http.server |
| 72 | - __org.eclipse.jgit.lfs.server.test__: Unit tests for org.eclipse.jgit.lfs.server |
| 73 | - __org.eclipse.jgit.lfs.test__: Unit tests for org.eclipse.jgit.lfs |
| 74 | - __org.eclipse.jgit.pgm.test__: Unit tests for org.eclipse.jgit.pgm |
| 75 | - __org.eclipse.jgit.ssh.apache.test__: Unit tests for org.eclipse.jgit.ssh.apache |
| 76 | - __org.eclipse.jgit.test__: Unit tests for org.eclipse.jgit |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 77 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 78 | ## Warnings/Caveats |
| 79 | |
| 80 | - Native symbolic links are supported, provided the file system supports |
| 81 | them. For Windows you must use a non-administrator account and have the SeCreateSymbolicLinkPrivilege. |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 82 | |
David Pursehouse | 368b519 | 2019-02-19 08:33:11 +0900 | [diff] [blame] | 83 | - Only the timestamp of the index is used by JGit if the index is |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 84 | dirty. |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 85 | |
David Pursehouse | 67da563 | 2017-02-10 15:58:26 +0900 | [diff] [blame] | 86 | - JGit requires at least a Java 8 JDK. |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 87 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 88 | - CRLF conversion is performed depending on the `core.autocrlf` setting, |
Robin Rosenberg | bf41eb0 | 2012-04-29 00:37:54 +0200 | [diff] [blame] | 89 | however Git for Windows by default stores that setting during |
| 90 | installation in the "system wide" configuration file. If Git is not |
| 91 | installed, use the global or repository configuration for the |
| 92 | core.autocrlf setting. |
| 93 | |
| 94 | - The system wide configuration file is located relative to where C |
| 95 | Git is installed. Make sure Git can be found via the PATH |
| 96 | environment variable. When installing Git for Windows check the "Run |
| 97 | Git from the Windows Command Prompt" option. There are other options |
Sebastian Schuberth | d7a4473 | 2015-05-19 11:43:30 +0200 | [diff] [blame] | 98 | like Eclipse settings that can be used for pointing out where C Git |
| 99 | is installed. Modifying PATH is the recommended option if C Git is |
| 100 | installed. |
Robin Rosenberg | bf41eb0 | 2012-04-29 00:37:54 +0200 | [diff] [blame] | 101 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 102 | - We try to use the same notation of `$HOME` as C Git does. On Windows |
| 103 | this is often not the same value as the `user.home` system property. |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 104 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 105 | ## Features |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 106 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 107 | - __org.eclipse.jgit__ |
| 108 | - Read loose and packed commits, trees, blobs, including |
| 109 | deltafied objects. |
| 110 | - Read objects from shared repositories |
| 111 | - Write loose commits, trees, blobs. |
| 112 | - Write blobs from local files or Java InputStreams. |
| 113 | - Read blobs as Java InputStreams. |
| 114 | - Copy trees to local directory, or local directory to a tree. |
| 115 | - Lazily loads objects as necessary. |
| 116 | - Read and write .git/config files. |
| 117 | - Create a new repository. |
| 118 | - Read and write refs, including walking through symrefs. |
| 119 | - Read, update and write the Git index. |
| 120 | - Checkout in dirty working directory if trivial. |
| 121 | - Walk the history from a given set of commits looking for commits |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 122 | introducing changes in files under a specified path. |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 123 | - Object transport |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 124 | |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 125 | Fetch via ssh, git, http, Amazon S3 and bundles. |
| 126 | Push via ssh, git and Amazon S3. JGit does not yet deltify |
| 127 | the pushed packs so they may be a lot larger than C Git packs. |
| 128 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 129 | - Garbage collection |
| 130 | - Merge |
| 131 | - Rebase |
| 132 | - And much more |
Robin Rosenberg | 2475d95 | 2014-07-16 01:53:50 +0200 | [diff] [blame] | 133 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 134 | - __org.eclipse.jgit.pgm__ |
| 135 | - Assorted set of command line utilities. Mostly for ad-hoc testing of jgit |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 136 | log, glog, fetch etc. |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 137 | - __org.eclipse.jgit.ant__ |
| 138 | - Ant tasks |
| 139 | - __org.eclipse.jgit.archive__ |
| 140 | - Support for Zip/Tar and other formats |
| 141 | - __org.eclipse.http__ |
| 142 | - HTTP client and server support |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 143 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 144 | ## Missing Features |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 145 | |
Robin Stocker | 9fbe88a | 2012-09-28 23:21:22 +0200 | [diff] [blame] | 146 | There are some missing features: |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 147 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 148 | - verifying signed commits |
| 149 | - signing tags |
| 150 | - signing push |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 151 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 152 | ## Support |
Robin Stocker | 6b74aff | 2012-09-08 19:58:37 +0200 | [diff] [blame] | 153 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 154 | Post questions, comments or discussions to the jgit-dev@eclipse.org mailing list. |
| 155 | You need to be [subscribed](https://dev.eclipse.org/mailman/listinfo/jgit-dev) |
| 156 | to post. File bugs and enhancement requests in |
| 157 | [Bugzilla](https://wiki.eclipse.org/EGit/Contributor_Guide#Filing_Bugs). |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 158 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 159 | ## Contributing |
Robin Stocker | 9fbe88a | 2012-09-28 23:21:22 +0200 | [diff] [blame] | 160 | |
David Pursehouse | 368b519 | 2019-02-19 08:33:11 +0900 | [diff] [blame] | 161 | See the [EGit Contributor Guide](http://wiki.eclipse.org/EGit/Contributor_Guide). |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 162 | |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 163 | ## About Git |
Git Development Community | 1a6964c | 2009-09-29 16:47:03 -0700 | [diff] [blame] | 164 | |
Robin Stocker | 9fbe88a | 2012-09-28 23:21:22 +0200 | [diff] [blame] | 165 | More information about Git, its repository format, and the canonical |
Matthias Sohn | 7611149 | 2019-02-18 01:11:57 +0100 | [diff] [blame] | 166 | C based implementation can be obtained from the |
| 167 | [Git website](http://git-scm.com/). |