SChaser
SChaser

Reputation: 61

Getting started with Eclipse + EGit - confused

I am used to using Eclipse with SVN and CVS.

Now I want to use GIT via EGIT.

The goal is to have a local repository, not in the eclipse work-space, that my changes go into. That way, I can make changes, commit them, and have a repository with the changes that I can back up (at least, that's how it works in SVN).

Following the user's guide, I find it creates the repository within my Eclipse project in the workspace, which is recommended against. What am I missing?

Steps:

Huh?

Upvotes: 6

Views: 3070

Answers (2)

Paul Webster
Paul Webster

Reputation: 10654

You can create multiple projects under one repo in EGit, see http://wiki.eclipse.org/EGit/User_Guide#Creating_a_Git_Repository_for_multiple_Projects In that case, EGit will do it automatically.

You can also use the Git Repository view to create an empty git repo outside of the workspace. See http://wiki.eclipse.org/EGit/User_Guide#Creating_a_Repository After that, you can create new java projects and specify the external git repo subdirectory as their location.

Upvotes: 2

VonC
VonC

Reputation: 1323135

Since:

  • you can create a java project outside of the workspace
    (see option "create project form existing source": the .project and .classpath will be created in the parent directory of the directory you will select as containing the sources)
  • Egit will create the .git where the .project and .classpath are created

you will have a repo outside of the Eclipse workspace.

Upvotes: 0

Related Questions