Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359880 - Restore deleted files from repository
Summary: Restore deleted files from repository
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 1.2   Edit
Hardware: All All
: P3 enhancement with 8 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-04 13:27 EDT by Markus Keller CLA
Modified: 2021-12-06 11:25 EST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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