Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Git as a folder in an existing project(egit repository under another)
icon5.gif  Git as a folder in an existing project [message #923106] Tue, 25 September 2012 15:54 Go to next message
elric best is currently offline elric bestFriend
Messages: 6
Registered: June 2012
Junior Member
I'm new to git, so please forgive if this is naive.

I have an eGit web project, but i'd like to leverage git projects from other sources: (e.g. facebook api, google api, etc) It would be handy if i could just checkout a version of these as a subfolder.

Is this possible?

Am I going against the grain of how it's supposed to work, and should i be looking at it a different way?


thanks!
Re: Git as a folder in an existing project [message #925283 is a reply to message #923106] Thu, 27 September 2012 15:10 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 612
Registered: July 2009
Senior Member
Sounds like you should have a look at git submodules. But beware it's adding some complexity.

http://git-scm.com/book/en/Git-Tools-Submodules
http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html
http://wiki.eclipse.org/EGit/User_Guide#Working_with_Submodules
Re: Git as a folder in an existing project [message #925543 is a reply to message #925283] Thu, 27 September 2012 20:40 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
Submodules might work but wouldn't it be just effective, and easier. simply to import the other repositories as Eclipse projects, wherever they happen to live? Generally that works fine, Even if for some reason the path needs to be referenced in a relative way, why not clone them as siblings of your repo, rather than sub-folders?

What's the advantage of using sub-folders?
Re: Git as a folder in an existing project [message #926260 is a reply to message #925543] Fri, 28 September 2012 13:21 Go to previous messageGo to next message
elric best is currently offline elric bestFriend
Messages: 6
Registered: June 2012
Junior Member
No Message Body
Re: Git as a folder in an existing project [message #926263 is a reply to message #926260] Fri, 28 September 2012 13:24 Go to previous message
elric best is currently offline elric bestFriend
Messages: 6
Registered: June 2012
Junior Member
Thank you, that's exactly the information I was looking for.
Previous Topic:Auto-share projects not working as intended?
Next Topic:branch deletion broken in Juno?
Goto Forum:
  


Current Time: Mon Dec 22 11:28:23 GMT 2014

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

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