Java 在 Windows 7 上的 Eclipse Luna 版本 (4.4.0) 中克隆 GitHub 存储库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25615416/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Clone a GitHub Repository in Eclipse Luna Release (4.4.0) on Windows 7
提问by Andy
I am kinda new to cloning GitHub repository using Eclipse.
我对使用 Eclipse 克隆 GitHub 存储库有点陌生。
One can open the GitHub Project repository from Eclipse using Git view (Window->ShowView->Others...->Git).
可以使用 Git 视图(Window->ShowView->Others...->Git)从 Eclipse 打开 GitHub 项目存储库。
After cloning the GitHub project on my local working set folder, I am not able to find any Java Code file or project files under Package Explorer pane.
在本地工作集文件夹中克隆 GitHub 项目后,我无法在 Package Explorer 窗格下找到任何 Java 代码文件或项目文件。
Here are the steps I am following:
以下是我正在执行的步骤:
Step 1:I created a local git repository which has working copy of my Eclipse Java Project.
第 1 步:我创建了一个本地 git 存储库,其中包含我的 Eclipse Java 项目的工作副本。
Step 2:Then I synced it up to GitHub. I can see my repository in GitHub
第 2 步:然后我将其同步到 GitHub。我可以在 GitHub 中看到我的存储库
Step 3: Next I tried to clone it on to my working set folder in Eclipse using Git View by using GitHub repository URI ( working set is a different local folder for my java project. It is not the same folder as my local master repository. Essentially I kind of downloaded my project files from GitHub in to working set folder on local drive)
第 3 步:接下来,我尝试使用 Git View 使用 GitHub 存储库 URI(工作集是我的 java 项目的不同本地文件夹。它与我的本地主存储库不同的文件夹。基本上我是从 GitHub 下载我的项目文件到本地驱动器上的工作集文件夹)
Step 4: I clicked on "Git Repositories" pane
第 4 步:我单击“Git 存储库”窗格
Step 5:Now I was expecting to see the Java Project loaded in the upper left top of the Eclipse Luna in the Package Explorer area. I see on the top section in the Package Explorer.
第 5 步:现在我希望在 Package Explorer 区域的 Eclipse Luna 的左上角看到 Java 项目加载。我在包资源管理器的顶部看到。
However I do not see any Java project in the Package Explorer area.I only see empty "Other projects" Working set. What must be going wrong ?
但是,我在 Package Explorer 区域中没有看到任何 Java 项目。我只看到空的“其他项目”工作集。一定是哪里出了问题?
采纳答案by Ishwar Lal
I have also faced same problem. I have followed following steps to resolve this issue:
我也遇到过同样的问题。我已按照以下步骤解决此问题:
- Select workset in which you wants to clone project
- Right click on workset > Click "Import" option
A small window will be open name "Import".
Go To Git Option and expand it. Then click "project from Git" and click next.
or
just type "Project from Git" in filter text box then select "Project from Git" and click next.
Use "GitHub" if project cloning from GitHub else use "URI"
- Next ... Configurations ....
- In the end you may get option to select workset. Then Finish
- 选择要在其中克隆项目的工作集
- 右键单击工作集 > 单击“导入”选项
一个小窗口将打开名称“导入”。
转到 Git 选项并展开它。然后单击“来自 Git 的项目”并单击下一步。
或者
只需在过滤器文本框中键入“来自 Git 的项目”,然后选择“来自 Git 的项目”并单击下一步。
如果从 GitHub 克隆项目,请使用“GitHub”,否则使用“URI”
- 下一步 ... 配置 ....
- 最后,您可能会获得选择工作集的选项。然后完成
If still not contains project, refresh workset.
如果仍然不包含项目,请刷新工作集。
Remember: In workspace, project should not contains same name as GitHub project. Only new/different name project will be check out.
请记住:在工作区中,项目不应包含与 GitHub 项目相同的名称。只会签出新的/不同名称的项目。