Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359880

Summary: Restore deleted files from repository
Product: [Technology] EGit Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: benoit.maggi, bugzilla, daniel_megert, Knut.Friedhelm, konrad_w, Marc.Herbert, remy.suen, stephan.herrmann
Version: 1.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Markus Keller CLA 2011-10-04 13:27:20 EDT
1.2.0.201110021920

I didn't find a way to restore a deleted file via EGit (and to see its history).

In CVS, every container offers "Team > Restore from Repository...", which shows a list of removed files.
Comment 1 Ulli Hafner CLA 2012-01-04 08:03:02 EST
This applies to staged and committed changes. I think there are several ways to restore deleted files. Maybe you could have a look at the CVS or SVN integration on how to do it (to provide a consistent user experience). 

For committed changes:
1. In the commit viewer: when selecting a deleted file it should have a context menu entry to restore.
2. In the history view : when selecting a deleted file it should have a context menu entry to restore.
(BTW: These options should also be available when the file is not deleted, this is also not possible from that view now).

For not yet committed changes: 
There should be a context action on the project or package that opens a dialog that shows the deleted files that could be restored (see subversive SVN integration). Currently you can only revert all changed files to the git index without a selection from a dialog.
Comment 2 Marc Herbert CLA 2012-02-16 06:14:11 EST
This looks like a duplicate of bug 345002 / bug 354982
Comment 3 Stephan Herrmann CLA 2012-07-21 08:51:47 EDT
For single files bug 345002 suggests to replace the parent folder with the HEAD revision.

I second this request for picking individual files for restoring while leaving the rest of the parent folder untouched.
Comment 4 Benoit Maggi CLA 2017-09-12 04:28:23 EDT
Would be nice, currently opening a file from history will open the default editor (doesn't seems possible to force text editor) which may not be useful to get the data Ex: EMF Editors