How to import a GIT non-Eclipse Java project into Eclipse?

后端 未结 6 459
一生所求
一生所求 2020-12-02 06:54

I have some problems importing a Java project into my workspace. I am following this tutorial - however I can not use the final Import existing projects ste

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-02 06:55

    With Git (especially EGit) your 2 best options are:

    1) Create a java project in eclipse, and then create a linked folder to where the source lives in your git repository (mentioned by @mattb). I don't think EGit will connect to your git repo easily in this mode, but your eclipse specific project files will be in a different location than your source tree.

    2) Create your java project and let it point to the external git repo (which you mentioned). It will create a .project and .classpath file where your source lives. Then using Team>Share Project will allow you to connect EGit to the already existing git repo.

    Option 2 (which I use) allows the tools to work with java projects in a git repo reliably.

提交回复
热议问题