Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » EGit and project delete
EGit and project delete [message #698176] Mon, 18 July 2011 23:43 Go to next message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
I'm used to working in CVS but have been trying a few things out with EGit in preparation for when the Eclipse platform migrated to using Git.

I noticed that if you have imported some projects into your workspace from a Git repository and then delete one of those projects checking the box that says "Delete Contents on Disk" you end up in a state that is very hard to recover from. I cannot switch to another branch - I get a message about uncommitted changes which shows the project I deleted in the file list. The synchronize view does not show the deleted project so I can't do an overwrite to recover the project.

I have two questions:
1. Is there any way of recovering from this short of deleting the repository and cloning it again from the remote server?
2. Is there a bug open on this issue?
Re: EGit and project delete [message #698451 is a reply to message #698176] Tue, 19 July 2011 13:48 Go to previous message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
The result of your delete action was to stage the deletion of all these files from the repository. You should see them listed in the 'Staged Changes' box of the "Git Staging" view. If you really intended to delete the project from the repository you should then commit the change. At this point everything should be fine. If you did not intend to delete the project from the repository, you need to get the change out of the staging area. One way to do this is with the 'reset' command. In this case you probably want the 'hard' option, to reset the working directory too. Again, at this point everything should be fine. The "Synchronize" view is different in egit than it is in the CVS, SVN, or Mercurial plugins. I don't think it's intended for reset operations.

Note that the reset will probably also remove any other uncommited or unstaged changes you might have, depending on the directory structure of your repository. There are ways to deal with this, but it's a different topic.
Previous Topic:Nightly update site doesn't work?
Next Topic:Can't find EGit settings after install
Goto Forum:

Current Time: Sat Jun 06 07:10:26 GMT 2020

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

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

Back to the top