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 t
Another possibility is using the Git Staging view:
staging
Now, to undo only some of the changes in the file, do the following:
This will make the left side correspond to the right side for this change. Save the file to finish the undo.
To undo all of your changes:
You can also select more than one unstaged file and then right click.
You can achieve this by doing a (hard) reset. On the project's context menu, select Team > Reset to..., choose "HEAD" and "Hard" as reset type.
Please note that doing this you will lose the changes of ALL files. To revert just a single file see this answer.
The functionality is actually in there, but it may be non-obvious:
btw, revert in git lingo means create a new commit to revert an earlier commit.