【发布时间】:2010-11-16 10:41:27
【问题描述】:
我正在为独立应用程序寻找适合 Java 的 Git 库。
有人可以推荐吗?
【问题讨论】:
我正在为独立应用程序寻找适合 Java 的 Git 库。
有人可以推荐吗?
【问题讨论】:
我相信您可以在您的 Java 应用程序中使用 JGit。
主页包括:
JGit 的依赖项非常少,因此适合嵌入到任何 Java 应用程序中,无论该应用程序是否利用了其他 Eclipse 或 OSGi 技术。
download page 提到:
JGit 可以在 Maven 构建中使用。
多个工件可用,具体取决于应用程序的要求:
在jgit-cookbook/blob/master/pom.xml 中查看完整的 pom.xl:
摘录:
<repositories>
<repository>
<id>jgit-repository</id>
<url>http://download.eclipse.org/jgit/maven</url>
</repository>
</repositories>
<!-- Core Library -->
<dependencies>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>3.4.1.201406201815-r</version>
</dependency>
</dependencies>
当前支持的 git 命令的确切列表并不总是最新的(如the bug 317482 illustrates):
2013 年 9 月至 2014 年 7 月更新:以下所有命令现已可用。
【讨论】: