Question

I am brand new to Git and EGit. I have been asked to troubleshoot a project stored in a Git repo located at http://com.myorg.gitrepo/githome/myapp.git.

First I tried just doing this on the Git command-line. From a terminal, I executed:

git clone http://com.myorg.gitrepo/githome/myapp.git myapp

The command was successful and I can now see a project checked out under /home/myuser/myapp (I'm on Ubuntu 14.04).

Now I'm trying to load the checked out project into Eclipse as a Java project. Here are the steps I'm taking:

1. Right-click Package Explorer>> Import >> Git >> Projects from Git >> Next

enter image description here

2. Existing local repository >> Next

enter image description here

3. Select `myapp` project to import >> Next

enter image description here

4. No project found!?!?

enter image description here

As you can see, EGit is looking for some config that isn't there, or perhaps I'm just using it incorrectly.

My questions:
  • What am I doing wrong, and what can I do to fix this and get the project imported?
  • How could I improve this process in the future, by using EGit to do the initial clone (bypassing the need to use the raw Git command line)?
Was it helpful?

Solution

Are you sure the project you are importing contains the files eclipse uses for project management?

How does the .gitignore look like? Does it include .metadata/, .project/ for example?

If it does, it means that repo is configured to ignore the configuration files eclipse uses for managing the project, and you should use the wizard to create the project.

I think it is considered good practice to not include any editor specific files in the repos, as these cause a lot of conflicts, and the project shouldn't really depend on the editor like that anyways.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top