EGit,为URI,主机和存储库路径选择正确的参数。

时间:2012-05-14 20:53:32

标签: eclipse git url import egit

我是GIT的新手,我正试图从eclipse.org git存储库中查看一些示例项目。我刚刚安装了EGit插件,并且在尝试在“从Git导入项目”菜单中输入正确的参数时遇到了障碍。

我想查看的示例的位置位于此处。

http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/dsf

但是我不确定如何从这个URL创建正确的URI,主机和存储库路径。

我希望能够探索该页面上列出的不同存储库(例如org.eclipse.cdt.examples.dsf文件夹)并检查这些项目,但是我无法弄清楚正确的git是什么这个网址会是。

我是从SVN来的,所以我确信我的术语有些错误。我一直在关注本教程使用git:http://wiki.eclipse.org/EGit/User_Guide#Cloning_Remote_Repositories

2 个答案:

答案 0 :(得分:2)

如果您在提及的页面中点击“Summary”(http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/dsf),您将会看到一个页面(http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/)显示在底部的 (你需要向下滚动),克隆地址:

  

克隆

git://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git
ssh://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git
http://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git

您可以使用其中一个地址从Egit克隆:请参阅用户手册中的“Cloning Remote Repositories”。

Egit clone

答案 1 :(得分:1)

This page包含Eclipse项目中有关克隆其git存储库的文档。它们显示了org.eclipse.cdt.git存储库的显式示例。你可以使用这个:

git clone git://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git

或者这个:

git clone http://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git

我通常会在git://个网址可用时使用这些网址。他们曾经更快,但这可能不再是真的。两者都应该工作得很好。

通常情况下,git://git.eclipse.org/gitroot/<PROJECT>/<REPO>可以使用存储库,您需要正确替换<PROJECT><REPO>