Getting started with Eclipse + EGit is confusing

I am using Eclipse with SVN and CVS.

Now I want to use GIT through EGIT.

The goal is to have a local repository, and not in the eclipse workspace, which includes my changes. That way, I can make changes, transfer them and have a repository with the changes that I can back up (at least the way this works in SVN).

Following the user guide, I found that it creates a repository in my Eclipse project in the workspace, which is recommended for use. What am I missing?

Steps:

  • Create a Java project in Eclipse (Test)
  • In the project, right-click-> Team-> Share Project β†’ Git
  • ... Next - shows "Configuring the GIT Repository Panel" ... The only repository that he will allow me to create is inside the project.

A?

+6
source share
2 answers

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

You can also use the Git repository view to create an empty Git repository outside 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 directory as your location.

+2
source

FROM

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

you will have a repo outside of the Eclipse workspace.

0
source

Source: https://habr.com/ru/post/890323/


All Articles