How make Eclipse/EGit recognize existing repository information after update?

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.

  • Gitolite Eclipse 'Auth fail'
  • Is .settings/org.eclipse.jdt.core.prefs part of the project?
  • How do I synchronize master and origin/master using egit in eclipse?
  • EGit and Eclipse modifies .gitignore file but it should not
  • svn command line from eclipse
  • What does the Refspec HEAD:refs/for/refs/heads/master generated by eGit/ZendStudio 9 mean?
  • 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?

  • Escape comment character (#) in git commit message
  • Project layout with vagrant, docker and git
  • Git - discard added files
  • Can I modify git-add's hunk size?
  • Git - Bitbucket repo hasnt stored the files in a sub-folder
  • Android Studio setup - Clear Read-Only Status
  • 2 Solutions collect form web for “How make Eclipse/EGit recognize existing repository information after update?”

    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:
      enter 'Git Repositories' View
    • Hit the “add” button (Tooltip: Add an existing local Git Repository to this view)
      add repositories
    • In the “Add Git Repositories” dialogue, under Search criteria, enter the workspace directory, select “Look for nested repositores“, and hit Search:
      select repositories to add
    • 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 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.

      select repository to use

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

    Even after adding git repos I cannot do Team/Share on project, but what helped was to close and open project – you can also select multiple projects so action is quick

    Git Baby is a git and github fan, let's start git clone.