How to link a project in Eclipse with the Git repository I imported from


I've googled all day and there's so many Git questions, it's hard to find anything about my actual question, which is this.

I have a local Git repository set up. I can pull a previously committed project into Eclipse (via "import…"), but when I do, the project has no association with that Git repository. The Eclipse project is actually a link to the Git work area, so I'm working with the correct files, but since Eclipse is unaware of the link, I can't use any of the team features on that project.

I realize I can then team->share the project and it will copy it somewhere else, but I don't see the point there (and it will probably break the original repository as Eclipse will move the files from the old location to the new).

In CVS and SVN you "checkout" and you get a copy and the association is automatically made with the repository you got the file from. I'm not seeing how to do that with Git in Eclipse.

Best Answer

After much putzing around, I finally figured it out. Once you import the project from the git repository into the eclipse workspace, you then team->share it back to the same repository and it will attach it. Not sure why this is a two step process but that's how I made it go. Maybe there's a simpler way, but I haven't found it yet.

Related Question