开发者

How to add an existing git repository (without an eclipse project) into eclipse?

开发者 https://www.devze.com 2023-03-26 18:48 出处:网络
I have a local git repository which has some Python modules and 开发者_开发知识库I would like to create a new project which includes these files (I installed egit egit).

I have a local git repository which has some Python modules and 开发者_开发知识库I would like to create a new project which includes these files (I installed egit egit). My repository does not include a .project file.


It happened to me not so long ago. I could not find a nice way to solve it, but found a simple way though :).

What I did was simple : Create a brand new project, and let it empty. Get the .project file wihch was created together with the project and add it in the git repository.

Now you can directly import your repo as a project.

Quite straightforward and simple.


I was also confused by this, and found the User Guide unhelpful.

I found the answer here: http://www.eclipse.org/forums/index.php/m/757705/

It is quite simple: you have to change the location in the "New Java Project" wizard, from the default location in your workspace to the folder in the cloned repository (probably ~/git/name_of_repo).


  1. File > New PyDev Project
  2. Unclick "Use default" and browse to your git repo.
  3. Enter project name. Name must be the same as the git repo. You'll get a "Source Folder Not Found" error if it's not.
  4. Click Finish.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号