1

I have an Eclipse project containing two Git Repositories (each different subfolder).

How do I let EGIT recognize them as Git Repositories?

Tried with Share Project, but it only seems to work on Project level, not on a subfolder.

When trying to configure a Git Repository with Share Project, I'm getting next error message:

Cannot move project Glims_9_5_pro to target location C:\Workspace\EclipseWorkspaceOE_11_3_GIT\Glims_9_5_pro\smartcomponents\Glims_9_5_pro, as this location overlaps with location C:\Workspace\EclipseWorkspaceOE_11_3_GIT

1 Answer 1

1

Maybe you could share and declare your project as a git Repo, and then add the two subrepos as submodules.

See "Working with Submodules".

https://wiki.eclipse.org/images/7/70/Egit-13-submodules-node.png

That way, those submodules would be recognized as Git repo in your one Eclipse project.

4
  • I'll give it a try. Although my project isn't a Git repo (but I'll make it one). Commented Jul 7, 2015 at 9:12
  • Doesn't seem to work very easily... My project is already set up with those subfolders. Made my project a Git Repo, but now marking these subfolders as submodules doesn't seem to be easy... Commented Jul 7, 2015 at 9:27
  • 1
    @LievenCardoen sure: I would start from scratch, with a project without those subfolders. Then I would add submodules (wiki.eclipse.org/EGit/User_Guide#Adding_a_Submodule: which would create those subfolders naturally)
    – VonC
    Commented Jul 7, 2015 at 9:32
  • Indeed, but we just created a script setting up those projects... So, like 30 developers have already set up their projects... I will have to find another way. We're currently using SourceTree, but having an Eclipse plugin would be very nice... Commented Jul 7, 2015 at 9:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.