Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Can't import from repo using the New Projects wizard
icon5.gif  Can't import from repo using the New Projects wizard [message #757510] Fri, 18 November 2011 12:21 Go to next message
Wyatt Spear is currently offline Wyatt Spear
Messages: 6
Registered: July 2009
Junior Member
I have a project in git with a sub-directory full of java I need to check out as a java project. I select that option in the egit import wizard and I get the new java project wizard where I stick with the defaults. When I hit finish I see the outline of the egit wizard for a moment and then it goes away, leaving me with a new, empty java project. There is no sign of or connection to the code in my repository. I may as well have created a new java project from the top-level menu.

I can use EGit to check out my directory as a general prjoject, but since I can't change the nature of the project that isn't very useful. Manually editing the nature and whatnot in the .project file hasn't worked very well for me.

I haven't seen anyone else reporting this problem, but it happens with the official release and the nightly build on a couple systems where I've tried it. I don't know if I'm doing something wrong or if it's a bug or expected behavior... any help or direction would be appreciated.
Re: Can't import from repo using the New Projects wizard [message #757705 is a reply to message #757510] Mon, 21 November 2011 05:03 Go to previous message
Stefan Lay is currently offline Stefan Lay
Messages: 338
Registered: July 2009
Senior Member
With git there is no 1:1 relation between repository and project. You may have many projects in one git repository, and you can choose any location.

Therefore you have to change the location in the "New Java Project" wizard and it has to point to a folder in the cloned repository. If you start the "New Java Project" wizard from the "Import > Git > Projects from Git" wizard EGit will also tell eclipse that the project uses EGit as team provider. You could even create a project in an existing local repository, but then you have to click on "Team > Share Project..." afterwards to tell eclipse that the project uses EGit as team provider.

It is recommended to checkin the .project and .classpath files. If you have done that, everyone who uses the "Import > Git > Projects from Git" can then just say "Import existing projects" and EGit will find the existing projects.
Previous Topic:Egit doesn't recognize user-created symbolic-refs
Next Topic:Passphrase fails with egit.
Goto Forum:
  


Current Time: Sun Apr 20 15:59:41 EDT 2014

Powered by FUDForum. Page generated in 0.03580 seconds