Eclipse git checkout (aka, revert)

Steve Kuo picture Steve Kuo · Nov 17, 2009 · Viewed 96.8k times · Source

Is it possible to do the equivalent of git checkout from within Eclipse using the EGit plugin?

I have a file that's been modified. I want to discards the changes and revert the file back to what's in the source repository. In Subversion this is called revert. In git the equivalent is checkout.

I can't find any menu item under Team that looks like checkout or revert. I'm using EGit 0.6.0.

Answer

Sergii Rudchenko picture Sergii Rudchenko · Nov 5, 2010

This can be done via the context menu "Replace with/File in Git index" on the file in package view.