Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » egit newbie: import existing git project&workspace
egit newbie: import existing git project&workspace [message #719255] Fri, 26 August 2011 14:14 Go to next message
Victor Volle is currently offline Victor Volle
Messages: 6
Registered: July 2009
Junior Member
Hi!

I am using Git for a while and now wanted to try out EGit.

I have a directory that is a Git workspace with a ".git" directory inside.
I now wanted to import that workspace into Eclipse and connect ("Team->Share") the project using the existing ".git" repository.

But I could not find a way to do that. It seems that I can only clone that ".git" again into a new Workspace+Repository. Am I doing something wrong?

All tutorials I could find describe how to clone from another repository (file system or GitHub) or to create a new repository.

Perhaps my expectations are wrong, but with SVN I can import an Eclipse project that I did checkout on the command line and later "connect" to the Subversion repository.

Thanks
Victor
Re: egit newbie: import existing git project&workspace [message #719306 is a reply to message #719255] Fri, 26 August 2011 16:34 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
I don't know what you mean by a "Git Workspace", but if you have a directory which in turn contains a .git directory, then you have a Git repository. To work with one or more Eclipse projects in an existing Git repository you have a couple of options, both easy.

1) Run "File -> Import -> Git -> Projects from Git" and follow the instructions, or

2) In the Git Repositories view, click the toolbar item "Add an existing local Git repository to this view", and then once it's listed, run "Import projects..." from the right-click menu
Re: egit newbie: import existing git project&workspace [message #719525 is a reply to message #719306] Sat, 27 August 2011 16:03 Go to previous message
Victor Volle is currently offline Victor Volle
Messages: 6
Registered: July 2009
Junior Member
ah, i found it: there is a checkbox i have misunderstood and/or overlooked: "Use or create Repository in parent folder of project".

For me the "parent folder of project" is not the folder which contains the ".project" file but the one above, because I think:

    parent (folder)
        project (folder)
            .project (file)


but obviously this is meant:

    parent (folder)
        .project (file)


just clicking the checkbox worked. I would expect, that the existing ".git" directory should be recognized by default
Previous Topic:String substitution in PSF files?
Next Topic:EGit keyboard handlling exception
Goto Forum:
  


Current Time: Thu Oct 30 14:36:13 GMT 2014

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

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