有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

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

我正在制作一个使用Git的Java应用程序。我发现有一种叫做 JavaGit、{a2}和{a3}

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

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

它和Eclipse有什么联系吗?(它位于www.eclipse.org上,JGit的documentation中也有很多“eclipse”关键字)

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

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

编辑:还有一个问题:

编辑:我找到了答案——它找到了(还没试过)。它位于名为BundleWriter的类中的transport包中


共 (3) 个答案

  1. # 1 楼答案

    您可以将JGit用作独立库,但是,如JGit Homepage中所述:

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

    从这个意义上说,JGit与Eclipse相连,因为EGit使用JGit特性来开发EclipseGit插件
    考虑到所有的Eclipse项目现在都在Git RePOS中被版本化(而不是以前的CVS RePOS),所以我会考虑java项目的JGIT,因为它看起来是:

    • JavaGit已经有一段时间没有更新了(2008年)
    • Eclipse承诺通过EGit为Git提供良好的支持,这将通过扩展确保JGit(由EGit使用)的开发

    Thorbjørn Ravn Andersen评论:

    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

    Eclipse项目from CVS to Git is in progresshas been reported here的迁移(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

    官方的错误说明了Eclipse承诺为现在Git repo上的所有Eclipse项目提供“充分的工具支持”,这就是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.

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

    bug 270854是关于弃用旧的VCS工具的,基本上包括CVS。)


    刚刚(2001年3月17日):The State of Git at Eclipse – Early 2011Chris 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.

  2. # 2 楼答案

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

    EGit是Git Eclipse团队的提供者,它将JGit集成到Eclipse IDE中,并提供了在Eclipse内部使用Git的UI

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

  3. # 3 楼答案

    作为JGit和EGit的作者之一,很抱歉给您带来困惑

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