Noumenon
Noumenon

Reputation: 6412

How can I create a root folder for my projects in Eclipse as recommended by EGit?

EGit User Guide suggests making a Repository working directory to store your projects, so you can add multiple projects to one repository:

enter image description here

How do I do this? I tried Eclipse's Create New Folder -- it only creates subfolders for projects. I tried moving the projects into a directory I created and hitting refresh -- nothing happened, and when I closed Eclipse it lost track of the .project file. I tried creating a new working set, but it didn't seem like the same thing.

Is this even a good idea?

Upvotes: 0

Views: 193

Answers (2)

Lars Gendner
Lars Gendner

Reputation: 1982

I do it like this:

  1. Create a directory somewhere (e.g. ~/git/myrepo)
  2. In the console/terminal: enter the directory you just created
  3. Create the Git repository using git init
  4. In Eclipse, right click on your project and select Team -> Share Project...
  5. As repository, select ~/git/myrepo/.git
  6. Working directory is ~/git/myrepo
  7. Click Finish

You can also try and create the repository using the "Share" dialog as well. This is something I did not try.

Upvotes: 1

Noumenon
Noumenon

Reputation: 6412

I believe this screenshot comes from the Git Repositories View, not Package Explorer. So you can achieve this simply by creating your repository in a folder outside of your Eclipse workspace.

Upvotes: 0

Related Questions