JavaGit、JGit 和 EGit 之间选择的困惑

发布于 2024-10-23 18:34:44 字数 925 浏览 1 评论 0原文

我正在制作一个使用 Git 的 Java 应用程序。我发现有一种东西叫做 JavaGit, EGitJGit

我知道 JavaGit 和 EGit/JGit 是不同的。我不明白的是 EGit 和 JGit 之间的区别。两者都托管在 Eclipse 项目上,但其中一个似乎与 Eclipse 相关,而另一个则不然。

我不使用 Eclipse,也不打算使用,所以我真的不太关心“Eclipse 集成”。

JGit 是否以某种方式连接到 Eclipse? (它托管在 www.eclipse.org 上,JGit 的文档也有很多里面的“eclipse”关键字)

在这三个中,我需要什么来连接我的 Java 程序(不是用 Eclipse 编写的)来使用 Git 存储库?

我更喜欢一个独立的 Git 库(即,不依赖于本地 Git 安装)

编辑:还有一个问题:

编辑:我找到了答案——确实如此(尚未尝试过)。它位于 transport 包中名为 BundleWriter 的类中

I am making a Java application that uses Git. I found that there is something called
JavaGit, EGit and JGit.

I know that JavaGit and EGit/JGit are different. What I don't understand is the difference between EGit and JGit. Both are hosted on Eclipse projects but one seems to be Eclipse related and the other not.

I don't use Eclipse and I don't plan to, so I really don't care much about "Eclipse integration".

Is JGit somehow connected to Eclipse? (It is hosted on www.eclipse.org, and the documentation of JGit also has a lot of "eclipse" keywords inside)

Out of the three, what will I need to connect my Java program (not written in Eclipse) to work with Git repositories?

I would prefer a standalone Git library (i.e., without depending on a local Git installation)

EDIT: One more question:

EDIT: I found the answer -- it does (haven't tried it yet). It is in transport package in a class called BundleWriter

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

魔法唧唧 2024-10-30 18:34:44

您可以使用 JGit 作为独立库,但是,正如 JGit 主页 中提到的:

JGit 可以在以下位置找到:
* Egit,Git 的 Eclipse 团队提供商

从这个意义上说,JGit 连接到 Eclipse,因为 EGit 使用 JGit 功能来开发 Eclipse Git 插件。
考虑到所有 Eclipse 项目现在都在 Git 存储库(而不是以前的 CVS 存储库)中进行版本控制,我会考虑将 JGit 用于您的 Java 项目,因为看起来:

  • JavaGit 已经有一段时间没有更新了(2008 年)
  • Eclipse 致力于提供一个通过 EGit 对 Git 提供良好的支持,这应该可以确保 JGit 的扩展(由 EGit 使用)的开发。

Thorbjørn Ravn Andersen 评论:

尽管你说 Egit 使用 JGit,但上面并不清楚 EGit 是 git 的 Eclipse 插件,以与 Eclipse 中已支持 CVS 相同的方式提供 git 支持

Eclipse 项目的迁移 从 CVS 到 Git 正在进行,以及 已在此处报告(由 Chris Aniszczyk)。

我在几个项目的开发列表中监控了有关将项目代码从 CVS 迁移到 Git 的对话。
大多数开发人员似乎都了解迁移的价值主张,尽管他们担心迁移会带来大量新的学习,因为他们知道如何在新环境中发挥生产力。

关于 EGit 项目正在开发的 Git 团队提供商的讨论不可避免地成为对话的一个重要部分。 “EGit 准备好迎接黄金时段了吗?”这是经常出现的问题

说明 Eclipse 官方错误承诺为 Git 存储库上的所有 Eclipse 项目提供“足够的工具支持”是 错误 293192

为了弃用旧的 VCS,转而使用 git(bug 270854)、足够的工具
应该可用。创建此错误是为了跟踪该错误。
[...]我打开/链接了相关的EGit bug,以便获得更好的可见性/跟踪
缺少什么。

因此,Egit 是该 bug 中唯一引用的项目,为所有 Eclipse 项目选择的新 (D)VCS 提供足够的工具支持。

bug 270854 是关于弃用旧的 VCS 工具,其中主要包括 CVS。)


刚刚发布(2001 年 3 月 17 日):Eclipse 中的 Git 状态 – 2011 年初 (

根据 Eclipse Marketplace 统计数据和项目收到的社区贡献,自去年以来事情已经取得了长足的进步,我对此感到很高兴。

EGit 安装率

那么下一步是什么?在工具方面,我们越来越接近 1.0 版本(计划用于 Indigo 版本)。
如今 Eclipse 的 git 工具已经好多了,如果您需要帮助或有疑问,请从最优秀的 EGit 用户指南

如果您是 eclipse.org 项目,请考虑开始将项目存储库移至 Git 的过程。 Git 上已有很多 eclipse.org 项目
很高兴看到所有 eclipse.org 项目都计划通过 Indigo 版本迁移到 Git。

You can use JGit as standalone library, but, as mentioned in the JGit Homepage:

JGit can be found within:
* EGit, Eclipse team provider for Git

In that sense, JGit is connected to Eclipse in that EGit uses JGit features to develop the Eclipse Git plugin.
Considering all Eclipse projects are now versioned in Git repos (instead of previously CVS repos), I would consider JGit for your Java project, as it seems that:

  • JavaGit isn't updated for quite some time (2008)
  • Eclipse is committed to offer a good support for Git through EGit, which should ensure by extension the development of JGit (used by EGit).

Thorbjørn Ravn Andersen comments:

Even though you say that Egit uses JGit, it is not quite clear in the above that EGit is an Eclipse plugin for git giving git support in the same way that CVS is already supported in Eclipse

The migration of Eclipse projects from CVS to Git is in progress, and has been reported here (by Chris Aniszczyk).

I’ve monitored conversations concerning the migration of project code from CVS to Git in the dev-lists of several projects.
Most developers, it seems, understand the value proposition of migrating, despite their concerns that with migration comes a whole lot of new learnin’ as they figure out how to say productive in the new environment.

Inevitably, discussion about the team provider for Git being developed by the EGit project becomes an prominent part of the conversation. “Is EGit ready for primetime?” is often the question that bounced around

The official bug illustrated Eclipse commitment to provide "adequate tooling support" for all Eclipse projects now on Git repo is the bug 293192.

In order to deprecate old VCS in favour of git (bug 270854), adequate tooling
should be available. This bug is created to track that.
[...] I opened/linked relevant EGit bugs in order to have a better visibility/tracking
of what's missing.

So Egit is the only project referenced in that bug to provide said adequate tooling support for the new (D)VCS chosen for all Eclipse projects.

(bug 270854 is about Deprecate old VCS tools, which includes essentially CVS.)


Just in (March 17th, 2001): The State of Git at Eclipse – Early 2011 (Chris Aniszczyk):

I’m happy that things have come quite a long way since last year based on Eclipse Marketplace stats and the community contributions the projects have received.

EGit installation rate

So what’s next? In terms of tooling, we’re getting closer to our 1.0 release (which is planned for the Indigo release).
The git tooling at Eclipse is much better these days, if you need help or have questions, please start with the most excellent EGit User Guide.

If you’re an eclipse.org project, please consider starting the process to move your project repository to Git. There are a lot of eclipse.org projects already on Git.
It would be nice to see the all of the eclipse.org projects have plans to move to Git by the Indigo release.

2024-10-30 18:34:44

作为 JGit 和 EGit 的作者之一,对于造成的混乱表示抱歉。

JGit 是一个 EDL(新式 BSD)许可、轻量级、纯 Java 库,实现了 Git 版本控制系统。它可以独立使用,也可以嵌入到 Gerrit、Eclipse、Netbeans 和 IntelliJ 等应用程序中。 EGit 嵌入 JGit 以使用它来处理 Git 存储库并从 Eclipse 中公开 Git 构造。目前,JGit 不支持 git-bundle 命令,但欢迎您提供支持,这应该不难,请参阅我们的贡献者指南。

As one of the authors of JGit and EGit, sorry for the confusion.

JGit is an EDL (new-style BSD) licensed, lightweight, pure Java library implementing the Git version control system. It can be used in a standalone fashion and is embedded in applications such as Gerrit, Eclipse, Netbeans and IntelliJ. EGit embeds JGit to use it to work with Git repositories and expose Git constructs from within Eclipse. At the moment, JGit doesn't support the git-bundle command but you're welcome to contribute support, it shouldn't be that hard, please see our contributor guide.

过潦 2024-10-30 18:34:44

只是为了插话,因为我刚才偶然发现了这个问题。

Eclipse Foundation 和 Eclipse IDE 之间存在差异。基金会是伞式组织,而 IDE 是通过基金会开发的项目之一。因此,需要了解的重要一点是,正如 Apache 始于 Web 服务器并扩展到托管多个项目的基金会一样,Eclipse 基金会现在也已扩展到 IDE 之外的“根源”。

因此,在这种情况下,JGit 代码为 git 命令提供 Java API,而 EGit 使用 JGit 为 Eclipse IDE 提供 git 支持。

就我个人而言,我有时也发现这有点令人困惑,有时似乎发生了这么多事情在某种程度上降低了这些组织的焦点;然而,我也看到了拥有一个伞式组织而不是 20 个类似但不同的组织的实用性。

Just to chime in, as I just stumbled on this this question just now.

There is a difference between the Eclipse Foundation and the Eclipse IDE. The Foundation is the umbrella organization, while the IDE is one of the projects developed through the foundation. So, the important thing to know is that just as Apache started with the web server and branched out to become a Foundation hosting a number of projects, so has the Eclipse Foundation now expanded beyond its "roots" in the IDE.

So in this context the JGit code provides a Java API for git commands, while EGit uses JGit to provide git support for the Eclipse IDE.

Personally, I also find this a little confusing at times, and sometimes it almost seems that having so much going on has in some ways degraded the focus of these organizations; however I can also see the utility in having one umbrella organization instead of 20 similar but different organizations.

枕梦 2024-10-30 18:34:44

JGit 是作为 Java 库从头开始实现的 git,而 JavaGit 是(曾经?)包装本机 git 实现的 Java API(即它调用本机 git 命令行)。

EGit 是 Git Eclipse 团队提供商,将 JGit 集成到 Eclipse IDE 中,并提供从 Eclipse 内部使用 Git 的 UI。

与此同时,Eclipse 社区的很大一部分以及大量的企业开发人员正在使用 EGit/JGit(这就是支持这些项目的公司投入资金的原因)。请参阅项目页面 ([1][2]) 和 ohloh 如果您想了解谁在贡献。

JGit is git implemented from scratch as a Java library whereas JavaGit is (was ?) a Java API wrapping the native git implementation (i.e. it's calling the native git command line).

EGit is the Git Eclipse Team Provider integrating JGit into the Eclipse IDE and is providing the UI to work with Git from inside Eclipse.

In the meantime a large part of the Eclipse community and also a large number of corporate developers is using EGit/JGit (that's the reason why the companies backing these projects put money into that). See the project pages ([1], [2]) and ohloh if you want to get some insight who is contributing.

天涯离梦残月幽梦 2024-10-30 18:34:44

JGit 是 Git 的 Java 实现。它是一个库,也可以在您自己的应用程序中使用。它还提供某种 CLI 操作。
另一边的EGit是Eclipse团队提供的Git插件,它使用JGit作为Git实现。简单来说,EGit 是 UI 部分,JGit 是后台部分。
JGit 不依赖于 EGit,但 EGit 确实依赖于 JGit。

来自: https://www.eclipse.org/forums/index.php /t/273443/

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. Simplified you could say EGit is the UI part, and JGit the background part.
JGit doesn't depend on EGit, but EGit does depend on JGit.

From: https://www.eclipse.org/forums/index.php/t/273443/

海风掠过北极光 2024-10-30 18:34:44

JGit 是一个操作 git 存储库的库。您不会单独使用 JGit,除非您编写一个程序以您喜欢的方式操作 git 存储库。

如果您使用 Eclipse 作为 IDE,则安装 EGit 作为版本控制插件(Indigo 中默认)。 EGit 调用 JGit,因此如果您安装 EGit,您也安装了 JGit。

请注意,对于 Netbeans,您将 NBGit 作为版本控制插件安装。 NBGit 也称为 JGit。

JavaGit:没有积极维护?

JGit is a library to manipulate git repository. You do not use JGit alone, unless you write a program to manipulate git repository in the way you like.

If you use Eclipse as the IDE, you install EGit as a version control plugin (defaulted in Indigo). EGit calls JGit so you also have JGit installed if you install EGit.

Note, for Netbeans, you install NBGit as a version control plugin. NBGit also calls JGit.

JavaGit: not actively maintained?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文