Git in Eclipse: files removed from local projects

I am currently working on several projects in Eclipse. I wanted to use versioning software and chose Git, which seems very good.

I decided to share the project on a network drive. In Eclipse, I clicked TEAM> SHARE PROJECT and selected a repository on this network drive.

All my files were moved to this repository, and there was nothing left in my local workspace. I do not understand why all the files disappeared. Could you explain to me what I did wrong to delete all my files (they are used as dependencies in other projects, so they are really needed on my local disk).

Also, what can I do to have a local copy of these files and push / commit when I think the files are ready for commit.

Edit: I found a comment matching my problem on the website:

I just tried this with EGit in Eclipse 3.7 Indigo. Sharing a project will not allow the repository to be in the project folder. It is possible to use the parent folder of the project, but this will overlap if the parent folder is the current Eclipse workspace. Perhaps the recommendations presented here, http://wiki.eclipse.org/EGit/User_Guide#Creating_Repositories are forced into the tool? The end result is that existing projects in the intended Eclipse workspace are instead β€œmoved” to a new or existing egit repository in HOME.

+4
source share
3 answers

I ran into the same problem. I created an error report for him: https://bugs.eclipse.org/bugs/show_bug.cgi?id=451521

So I don’t think you were doing something wrong.

+3
source

At the time of writing, you should use (right-click Project) Refactor -> Move (return to where it should be). But apparently these files are not version controlled!

Taken from: https://www.eclipse.org/forums/index.php/m/1621217/#msg_1621217

NB is a shocking mistake, and the Egit team needs to deal with it as soon as possible. Wouter reported an error in November 2014.

0
source

Source: https://habr.com/ru/post/1433310/


All Articles