Eclipse / EGit在更新后如何识别现有存储库信息? [英] How make Eclipse/EGit recognize existing repository information after update?

查看:168
本文介绍了Eclipse / EGit在更新后如何识别现有存储库信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用EGit plugin 1.0.0将Eclipse从Helios升级到Indigo后,我的所有项目似乎都分别丢失了有关其git存储库的元数据。



在Helios ,每个Eclipse项目都是一个git存储库。当更新到靛蓝时,我希望可以继续使用Helios的工作区。更新后,所有项目仍然存在于工作区中;在每个项目目录中,仍然存在 .git 子目录,但Eclipse似乎将每个项目视为已经不是git仓库。



因此,项目文件夹中仍然有所有git元数据,但是eclipse无法识别它们。有没有另外一种方式来重新启动git功能?

解决方案

感谢Jeremy,我发现如何重新激活自己的回复。基本上需要两个步骤:


  1. 将(已存在的)本地存储库添加到EGit的 Git存储库 view;

  2. 使用或创建存储库再次分享每个项目。

如果在存储库视图中没有可用的repo,则第二步将不起作用。因此,在eclipse升级后,执行以下操作:



将(已存在的)本地存储库添加到EGit的 Git存储库查看




  • 打开 Git存储库视图:

  • 点击添加按钮(工具提示: code>将现有的本地Git存储库添加到此视图)

  • 在添加Git存储库对话框中的搜索条件下,输入工作区目录,选择code>查找嵌套的存储库,然后点击搜索

  • 选择要添加的存储库,然后单击确定



    • 使用或创建存储库再次分享每个项目




      • Ø在Eclipse的项目浏览器;

      • 中点击现有项目,右键单击并选择团队 - > 共享项目...

      • 选择Git Project,然后在下一个对话框中选择在项目的父文件夹中使用或创建Repository 。重要提示:不要尝试从组合框中选择在项目的父文件夹中使用或创建存储库时可见的存储库 - 它不会被选中工作。






      向导建议位于当前项目中的本地git仓库,因此只需点击 Finish 即可。


      After upgrading Eclipse from Helios to Indigo with EGit plugin 1.0.0, all my projects seem to have lost their metadata about their git repositories, respectively.

      In Helios, every Eclipse project was a git repository on its own. When updating to Indigo, i hoped i could continue using the workspace from Helios. After the update, all projects are still present in the workspace; and in each project directory, there's still the .git subdirectory, but Eclipse seems to treat each project as if it wasn't a git repository already.

      So, there's still all git metadata in the project folders, but eclipse doesn't recognize them. Is there another way to "reactivate" the git functionality?

      解决方案

      Thanks to Jeremy, i found how to reactivate the repos myself. Basically, two steps were required:

      1. Add the (already existing) local repository to EGit's Git Repositories view;
      2. "Share" each of the projects again using "use or create repository".

      The second step won't work if the repo isn't available in the repository view. So, after an eclipse upgrade, do the following:

      Add the (already existing) local repository to EGit's Git Repositories view

      • Open the Git Repositories view:
      • Hit the "add" button (Tooltip: Add an existing local Git Repository to this view)
      • In the "Add Git Repositories" dialogue, under Search criteria, enter the workspace directory, select "Look for nested repositores", and hit Search:
      • Select the repositories you want to add and click OK

      "Share" each of the projects again using "use or create repository"

      • Open you existing project in Eclipse's Project explorer;
      • Right-click and select "Team -> Share Project...":
      • Select Git Project, and in the next dialogue, select "Use or create Repository in parent folder of project". Important: don't try to select the repository from the combo box that's visible when "Use or create Repository in parent folder of project" isn't selected - it won't work.

      The wizard suggests the local git repository that's located in the current project, so just hit Finish.

      这篇关于Eclipse / EGit在更新后如何识别现有存储库信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆