Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot move project as it overlaps... Git/Eclipse

I am trying to move a project into my git repo, using Team -> Share Project -> Git, when I select the repo the error "Cannot move project x to target location...as this location overlaps with location..."

My workspace and repo are different folders (this seems to fix it for most people).

like image 951
shell Avatar asked Jan 29 '15 20:01

shell


4 Answers

Which version of eclipse and egit plugin are you using?

For me on Kepler Service Release 2 and Egit 3.2.0 it works if I choose: Team->Share Project->Git and then tickbox Use or create repository in parent folder of project BUT then select the project folder . instead of the parent ..

like image 99
Maks Avatar answered Nov 04 '22 14:11

Maks


In my case, there was a .project file inside the git repo. I just deleted it from the terminal. Then everything works perfectly. You can't access it with the GUI which is another reason why terminal is awesome!

like image 3
Jassim Ahmed Avatar answered Nov 04 '22 14:11

Jassim Ahmed


Tried many options but they didn't work. I've posted an answer in another similar question which is a manual way to do it which will work with any Eclipse version, here is the link: https://stackoverflow.com/a/41799215/578046

like image 2
Saurabh Patil Avatar answered Nov 04 '22 13:11

Saurabh Patil


I got this error when attempting to bring in a new subproject into an existing parent project in a "split" workspace i.e. the default configuration using separate workspace and git folders.

The final workaround was different from others listed:

  1. Delete the project from within Eclipse (choose default option: DO NOT delete on filesystem)
  2. Use the system shell move the new subproject from the Workspace location into its proper place under the parent project in the git folder structure
  3. In Eclipse, go to the the Git Repositories view, right-click the new project folder under Working Tree, and choose "Import Projects..." to reimport the project
  4. Re-add the project to any Working Sets it needs to be part of
like image 1
Alex R Avatar answered Nov 04 '22 12:11

Alex R