Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recover overwritten file with eclipse git

I've overwritten one of my local changes in Eclipse to one of the files by mistake! How can I get my local changes back? I'm using Git in Eclipse and in the Team Synchronize window I clicked Overwrite to one of the files I did not want to!

like image 638
Bankin Avatar asked Oct 11 '13 09:10

Bankin


People also ask

How do you retrieve a file that has been overwritten?

Restore Previous Versions (PC) – In Windows, if you right-click on a file, and go to “Properties,” you will see an option titled “Previous Versions.” This option can help you revert to a version of your file before the overwrite occurred, allowing you to get your data back.

Can files be recovered after being overwritten?

If the file is overwritten, the new data overwrites the old one, such a file cannot be recovered. The new file may have the same name and size, but the content will be new.

Can we recover deleted files from Eclipse?

To restore a deleted file, right-click the file's project, and select Restore from Local History, opening the dialog shown in Figure 2-18. In the figure, a . class file that was deleted is restored.


1 Answers

You can use local history information from eclipse

http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2FgettingStarted%2Fqs-55.htm

Right-click the file in a navigation view (e.g. the Project Explorer) and select Team > Show Local History.

like image 101
RamonBoza Avatar answered Oct 01 '22 14:10

RamonBoza