1

i recovered a project from git depot after running "clone git repository command" in

i can see branches in Eclipse git explorer.

but now how to start with opening files from this project ?

I tried 'import project ' in git explorer and in package explorer but it return an error

" could not import project located at : c:\users..."

I surely miss a step ..

thanks for help

froggy
  • 513
  • 2
  • 6
  • 21
  • Q: Does the Git repository you cloned happen to contain an Eclipse project (e.g. ".project" directory and project configuration files)? If not, then you must (re)create the Eclipse project manually. – paulsm4 Mar 08 '21 at 21:03
  • it's code i recover , i assume it was an eclipse project, but previous developer is no longer here.. is there a way to check this ? – froggy Mar 09 '21 at 09:03

2 Answers2

1

Cloning a git repository just creates a local git repository. You will have to import the directory in that repository as an Eclipse project. You'll have to focus on the error you get doing that.

David M. Karr
  • 14,317
  • 20
  • 94
  • 199
  • Of course, it's also possible the OP never actually checked the Eclipse project files in to Git: only the project source :( – paulsm4 Mar 08 '21 at 21:04
1

Q: I assume it was an eclipse project... is there a way to check this?

A: An Eclipse project will typically have a .project and a .classpath file (both Eclipse-generated) at the root.

The part David M. Karr is alluding to is that, if you have a "project", you probably still need to "import" it into a "workspace". I'm worried that maybe you don't even have a "Eclipse" project - just some Java source code (and perhaps a "pom.xml" or similar "build file").

SUGGESTIONS:

  1. You absolutely need at least a basic familiarity with Eclipse before you can hope to successfully build anything. Here is a good overview:

  2. It doesn't matter how you clone the Git repository: you can do it manually (from Git), or you can use Eclipse's Git plugin.

  3. See if the project you checked out has a .project file. If it doesn't, you'll probably need to create one from scratch. It isn't difficult. See the Vogella tutorial, or look here.

  4. If you have a ".project" file - but still aren't able to "build" - then "import", per David M. Karr's suggestion

paulsm4
  • 114,292
  • 17
  • 138
  • 190