Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a simple revert work on Git / EGit?

Ok. Simple things should be simple, so I hope it is. :)

I have changed a file, now I want to revert back to the latest version in the git repo because my changes are crap and I want to start fresh again changing the file.

As far as I am concerned you should do this:

git checkout -- <NAME OF FILE>

First question: How to do this inside eclipse with EGit? There is no checkout option under team. :( :( :(

Now let's suppose I have multiple files modified in multiple directors. How do I revert all of them to start fresh again?

like image 731
JohnPristine Avatar asked Feb 11 '13 17:02

JohnPristine


1 Answers

In my version "Replace With..." -> "HEAD Revision" seems to be doing just that...

It's not in the "Team" submenu, which is a bit confusing, I admit..

Also, this might help : Eclipse git checkout (aka, revert)

like image 54
phtrivier Avatar answered Oct 11 '22 21:10

phtrivier