Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Disconnect Project & Delete Repository Issue(Unexpected behaviour with disconnect project combined with delete repository)
Disconnect Project & Delete Repository Issue [message #1732730] Thu, 19 May 2016 16:11 Go to next message
Markus Walther is currently offline Markus WaltherFriend
Messages: 4
Registered: May 2016
Junior Member
Hi,

So I just tried to push my project onto my repo.
Since I had some issues with it I figured I probably made a mistake when setting up the repo.

Then I decided to try it all again and disconnected the project via Team > Disconnect. After that i proceeded to delete the local repo via eclipse and checked all the checkboxes:
-Delete Git repository data and history
-Also delete working directory
-Remove the project in the repository from the workspace

Since I had already disconnected the project I just expected the repository to be deleted - instead the project was delete as well.

Can someone explain why EGit does this?
Considering that the project is moved from the workspace location to the local repo when 'Sharing' it, i naturally expected it to be moved back once I disconnected it.

Because my backup somehow didn't run and this was my only copy, I lost the whole project due to this unexpected behaviour, which is kind of a bummer.

Thanks for any insights on this
Re: Disconnect Project & Delete Repository Issue [message #1733037 is a reply to message #1732730] Mon, 23 May 2016 22:43 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1072
Registered: July 2009
Senior Member
EGit asked you if you want to
- delete the repository
- delete the repository's working directory (that's the folder above the .git directory)
- delete contained projects
and you confirmed this

Hence EGit
- deleted the repository
- deleted the working tree (containing whatever files were checked out from the repository)
- deleted the projects (which are stored in the Eclipse workspace)
Re: Disconnect Project & Delete Repository Issue [message #1745555 is a reply to message #1733037] Wed, 12 October 2016 13:07 Go to previous message
Markus Walther is currently offline Markus WaltherFriend
Messages: 4
Registered: May 2016
Junior Member
I kinda forgot about this issue but what you wrote does not explain it to me at all. Well, I get what is happening and why, but here is my reasoning why it's unexpected.

If I explicitly disconnect the project from GIT and only delete the repository _afterwards_ it seems to me this should not affect the already _disconnected_ project.

My expected behaviour:
* I create a project
* I share it via Team > Share
* It is moved to the repository working directory (eg. from C:\Users\UserX\workspace\project to C:\Users\UserX\git\repo\project)

So far this is exactly what happens, then:

* I disconnect it via Team > Disconnect
* It is moved back to the workspace (eg. from C:\Users\UserX\git\repo\project to C:\Users\UserX\workspace\project) - This does not happen
* I delete the repository (C:\Users\UserX\git\repo)
* Project still exists in C:\Users\UserX\workspace\project - Obviously not as it was never there
Previous Topic:Mylyn Github task repository responds with connection refused
Next Topic:folder ignored in submodule appears as tracked
Goto Forum:
  


Current Time: Thu Aug 22 18:04:06 GMT 2019

Powered by FUDForum. Page generated in 0.02587 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top