|
|
|
Re: How to discard file modification [message #714883 is a reply to message #668183] |
Thu, 11 August 2011 16:53 |
|
I have occasionally removed the folder in my workspace (from command line, not from Eclipse).
EGit shows the outgoing changes, but I am not able to revert them (I tried "Replace with" → "HEAD" and "Replace with" → "File in Git Index" in Synchronize view). No reaction. Does it have something to do with https:/bugs.eclipse.org/bugs/show_bug.cgi?id=345002 ?
Is there any way for me to recover / revert?
[Updated on: Thu, 11 August 2011 17:18] Report message to a moderator
|
|
|
|
|
|
|
Re: How to discard file modification [message #715770 is a reply to message #715758] |
Mon, 15 August 2011 13:20 |
R Shapiro Messages: 386 Registered: June 2011 |
Senior Member |
|
|
Continuing with these experiments, there's good new and bad news.
Good news: you can generally restore deleted files, and the containing directories, via Restore From Local History. Obviously this depends on your Local History preferences and the specific context in which you try to restore after a delete. Using command-line git is probably easier, especially with Terminal view, and certainly more reliable. But if you don't have command-line git and you act promptly, you can probably restore your deleted files this way.
Bad news: all the previously mentioned issues regarding deleted directories also apply to individual files, even when the containing directory still exists.
I tried deleting a single file to see if Git Tree Compare would show the deletion. It does not. Worse, the parent directory does not have the expected '>' decoration. Thus the Explorer view gives me no indication whatever that I have an un-commited modification. The deletion is listed as a Staged Change in the Git Staging view, but I can't undelete from there. I can un-stage it -- that's as far as I can get using egit. I cannot replace the file from the Index. To undelete without a hard reset I need to depend on on Local History, or resort to command-line git.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03346 seconds