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

JohnPristine picture JohnPristine · Feb 11, 2013 · Viewed 48.6k times · Source

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?

Answer

phtrivier picture phtrivier · Feb 11, 2013

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)