Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » multiple git repositories in a single Eclipse project?(how to manage multiple git repos in a single Eclipse project)
multiple git repositories in a single Eclipse project? [message #1736170] Mon, 27 June 2016 09:14 Go to next message
Horacio Anton Quiles is currently offline Horacio Anton QuilesFriend
Messages: 2
Registered: June 2016
Junior Member
Hello,

I have an Eclipse (CDT) project which contains multiple git repositories. The project's root directory is a git repository itself; various subdirectories also contain their own repositories.

Eclipse easily connects to the root git repository, but I have been unable to find a way to make Eclipse realize that the subdirectories correspond to different repositories.

Is there a way to do it?

If not, why? Is it just not implemented? Or maybe it can't be done because of an EGit limitation, or a limitation in the Eclipse Team Provider infrastructure? (I'm assuming that this kind of thing should be transparent to JGit, just as it is to the native git). Should I open a bug report/feature request? (if so, where? in EGit's tracker?)

And, can anyone propose an alternative? For example, I have tried keeping each repository in its own project, and use the project's properties to exclude the subdirectories in the root project while making it depend from the "subprojects" - but it's messy, and still, the whole project gets built by a single makefile, so the non-root projects have their indexing messed up because of their lack of access to the build console output.

I have seen mentions of using git submodules to make this kind of repository nesting explicit at the git level. But submodules seem to have their own problems, which is the reason why I am not using them already outside of Eclipse; so I would prefer avoiding them.

Any hint will be welcome. Thanks!
Re: multiple git repositories in a single Eclipse project? [message #1736200 is a reply to message #1736170] Mon, 27 June 2016 13:00 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 943
Registered: July 2009
Senior Member
Recent versions of EGit should properly detect nested repositories.

Try to upgrade to the latest release 4.4 from http://download.eclipse.org/egit/updates
or nightly build from http://download.eclipse.org/egit/updates-nightly.
Re: multiple git repositories in a single Eclipse project? [message #1736203 is a reply to message #1736200] Mon, 27 June 2016 13:26 Go to previous messageGo to next message
Horacio Anton Quiles is currently offline Horacio Anton QuilesFriend
Messages: 2
Registered: June 2016
Junior Member
Oh my. Yeah, I just updated to just-released Eclipse Neon, and I only had to use Team->Share Project for all the nested repositories to be detected automatically.

I had checked Neon's release notes, and searched EGit's bug tracker mailing lists and this forum, but found nothing! And still I missed it...

Anyway, thank you! Smile
Re: multiple git repositories in a single Eclipse project? [message #1736268 is a reply to message #1736203] Tue, 28 June 2016 07:18 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 943
Registered: July 2009
Senior Member
This improvement was shipped with 4.3.
Find the release notes here http://projects.eclipse.org/projects/technology.egit/releases/4.3
Previous Topic:Unable to pull - Attempted to beginRule: R/, does not match outer scope rule: MultiRule
Next Topic:Unable to delete remote branch
Goto Forum:
  


Current Time: Fri Jul 28 13:13:07 GMT 2017

Powered by FUDForum. Page generated in 0.03787 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software