title: Is it better to keep Git repository inside or outside of Eclipse workspace?
body: <p>I am a typical Eclipse/Subversion user beginning the migration to Git. I've researched the basic concepts of git and have decided to stick to a one project per repository approach initially to keep things simple. I am still having trouble, though, deciding where to place the repository for each project.</p>
  
  <p>I have spent a lot of time reviewing the answers to <a href="https://stackoverflow.com/questions/7906045/git-eclipse-workflow">this question</a>, although I believe the author of that question was assuming that you can only use Eclipse to manage the repository if the repository is located within the Eclipse workspace, which is, of course, not true.</p>
  
  <p>The thing that struck me most about that question, though, was the fact that all but one answer (including the accepted answer) suggested keeping the repository inside the Eclipse workspace, whereas only one answer pointed out that the <a href="http://wiki.eclipse.org/EGit/User_Guide#Considerations_for_Git_Repositories_to_be_used_in_Eclipse" rel="noreferrer">EGit User Guide</a> recommends the exact opposite.</p>
  
  <p>It would appear in practice, however, that there are a number of approaches implemented by Eclipse/EGit, some of which seem to contradict the EGit recommendations.</p>
  
  <p>For example, if you use the New Project Wizard to create a New PHP Project from Git and the repository is remote, Eclipse/EGit will happily create a project folder in the Eclipse workspace and put the repository (.git) in the project folder. This is the end result that I actually want, as it keeps everything encapsulated within the Eclipse workspace.</p>
  
  <p>However, if you use the New Project Wizard and select a Git repository that is local, Eclipse/EGit doesn't clone the repository like it does for remote repositories. Instead it uses the working copy of that repository as the project location, creates its .project and other meta stuff in that location and also creates a new (seemingly unnecessary) folder within that working copy with the same name as your project (so you end up with, for example,  <code>~/git/blah/blah</code>). If you delete that superfluous folder you end up with a structure that is identical to the first example, the only difference being that the project folder is not a sub-folder of your Eclipse workspace folder, it is somewhere else on your file system (eg. <code>~/git/blah</code>). The only positive thing this approach seems to have going for it is that it adheres to the recommendations in the EGit User Guide, but from a technical perspective, its hard to see how this is really all that different to the first example.</p>
  
  <p>Given these puzzling observations, I'm wondering what sort of experiences people have had using each of these approaches and what the pitfalls might be if one ignores the recommendations in the EGit User Guide.</p>