title: How do I reconnect a moved git repository with it's original project in Egit?
body: <p>I have a number of projects within an Eclipse workspace. One project is connected with a git repository. This is the original directory/project structure:</p>
  
  <pre><code>Eclipse_workspace
    Eclipse_workspace/Project1
      Eclipse_workspace/Project1/.git
    Eclipse_workspace/Project2
  </code></pre>
  
  <p>After reading about the complications that can arise from keeping a git repository within the parent directory of a project in a workspace (<a href="http://wiki.eclipse.org/EGit/User_Guide#Considerations_for_Git_Repositories_to_be_used_in_Eclipse" rel="nofollow">here</a>), I decided it would be best to move the repository outside the workspace. Here is the revised structure:</p>
  
  <pre><code>Eclipse_workspace
    Eclipse_workspace/Project1
      Eclipse_workspace/Project1
    Eclipse_workspace/Project2
  .git
    .git/Project1
  </code></pre>
  
  <p>Within the "Git Repositories" view I re-added the repository. I thought it would be simple to reconnect the repository to "Project1" by altering a few file path settings. I found that this was not possible from Project1's properties (right click on project -> properties). I noticed that within the "Share Project" wizard you can connect to an "existing repository". So I disconnected the project from the now non-existent repository and I tried to reconnect it using the "Share Project" wizard. But although the repository is shown in the "Git Repositories" view, I was unable to select it. I clicked the "create" button and tried typing in the file path but this gave me an error stating that the directory is "not empty".</p>
  
  <p>So I have now become stuck as there seems to be no other options available. How can I reconnect this repository? I'm surprised by how complicated this is, I must be doing something really obviously wrong. I really need to get on with some work and messing around with Egit is taking up all of my time.</p>